package example.stdhaskell.chapter09;

import haskell.Prelude;
import haskell.prelude.IO;
import haskell.prelude.Int;

public class StackMain implements Prelude {

    /**
     * main = print . top . pop . push 3 . push 2 . push 1 $ emptyStack
     */
    public static void main(String[] args) {
        IO<?> main = IO.<Int>print()
                ._dot_(Stack.<Int>top())
                ._dot_(Stack.<Int>pop())
                ._dot_(Stack.<Int>push().apply(Int.valueOf(3)))
                ._dot_(Stack.<Int>push().apply(Int.valueOf(2)))
                ._dot_(Stack.<Int>push().apply(Int.valueOf(1)))
                .apply(Stack.<Int>emptyStack());
        System.out.println(main);
    }

}
