StackEdit on GitHub
An immutable stack implementation. A stack is a LIFO (last-in-first-out) data structure where new values are added, retrieved, and removed from the end.
Creates a new stack.
Checks if the given stack contains no items.
Deprecated: Please use
Stack.headwill be removed in v0.4.0.
item is the value at the top of the stack, and
Adds a new item to the top of the stack.
Removes the item at the top of the stack.
Computes the size of the input stack.