An implementation of a generic stack data structure in Elm.
Please file any issues here.
Feedback and contributions are welcome!
A stack is used to represent a Last-In, First-Out (LIFO) collection of values.
Here is a very simple example of a Stack
with what the state of the Stack
would be along the way:
Stack.empty -- Stack []
|> Stack.push "World!" -- Stack ["World!"]
|> Stack.push "Hello" -- Stack ["Hello", "World!"]
|> Stack.pop -- (Just "Hello", Stack ["World!"])