purescript-stack

Stack data structure and associated operations


License
MIT
Install
bower install purescript-stack

Documentation

purescript-stack

(Based on Haskell's Data.Stack, http://hackage.haskell.org/package/Stack-0.4.0/docs/Data-Stack.html)

Stack data structure and associated operations

A stack is a basic data structure that can be logically thought as linear structure represented by a real physical stack or pile, a structure where insertion and deletion of items takes place at one end called top of the stack.

In other words, a 'Stack' is an abstract data type that serves as a collection of elements, with two principal operations: 'stackPush', which adds an element to the collection, and 'stackPop', which removes the most recently added element that was not yet removed.

See also https://en.wikipedia.org/wiki/Stack_(abstract_data_type)