Documentation
push :: [a] -> a -> [a] Source #
Push a value onto the stack, return the new stack
pop :: [a] -> (Maybe a, [a]) Source #
Remove the top of the stack, return a tuple containing
the old top and the new stack
seek :: (a -> Bool) -> [a] -> Maybe a Source #
Return the first element of the stack validating the
function given as parameter
clear :: [a] -> [a] Source #
Clear the stack by return an empty stack