Stacks

A stack is a deque where items can be Pushed onto the stack, and the top item can be Popped off the stack.

Stacks are wrapped GAP plain lists.
API

stack Constructor for stacks true or false Category of heaps Puts object onto stack.

object or fail Return the object at the top of stack. If stack is empty, returns fail object or fail Remove the top item from stack and return it. If stack is empty, this function returns fail. Number of elements on stack