| Input | A list of elements. |
| Output | A stack containing the list of elements with the last element at the top of the stack. |
| Input | A stack and an element. |
| Output | A new stack with the element added to the top. |
| Input | A stack. |
| Output | A new stack with the top element removed. |
| Input | A stack. |
| Output | The element at the top of the stack. |
| Input | A stack. |
| Output | True if the stack is empty, false otherwise. |
| Input | A stack. |
| Output | True if the stack is not empty, false otherwise. |
| Input | A stack. |
| Output | The number of elements in the stack. |
| Input | A stack. |
| Output | A new stack with the elements in reverse order. |