A first-in, first-out queue (FIFO) backed by lists.
elm install avh4/elm-fifo
empty : Fifo a
insert : a -> Fifo a -> Fifo a
remove : Fifo a -> (Maybe a, Fifo a)
import Fifo
main =
Fifo.empty
|> Fifo.insert 7
|> Fifo.insert 42
|> Fifo.remove |> Tuple.second -- gets the updated queue
|> Fifo.remove |> Tuple.first -- gets the value at the top
|> Debug.toString
|> Html.text
-- Shows "Just 42"