ntreu14/elm-stack - version: 1.1.0

for more information visit the package's GitHub page

Package contains the following modules:

Stack

An implementation of a generic stack data structure in Elm.

Please file any issues here.

Feedback and contributions are welcome!

Example

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!"])