Re: [stack] Re: Cat article submission to Doctor Dobbs Journal
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Briefly, just to give the correct types for functions involving first-
class stacks:
infra :: A {B} (B -> C) -> A {C}
push :: A c {B} -> A {B c}
pull :: A {B c} -> A c {B}
nullstk :: A -> A {_}
stack :: A -> A {A}
unstack :: A {B} -> B
swapstk :: A {B} -> B {A}
swapstk can be defined in terms of the other functions.
- John