Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
stack of Int, by adding the length field as the zero-th element to a Vec
- data Stack
- newStack :: Int -> IO Stack
- clearStack :: Stack -> IO ()
- sizeOfStack :: Stack -> IO Int
- pushToStack :: Stack -> Int -> IO ()
- popFromStack :: Stack -> IO ()
- lastOfStack :: Stack -> IO Int
- shrinkStack :: Stack -> Int -> IO ()
- asSizedVec :: Stack -> Vec
- isoVec :: Stack -> IO Vec
Documentation
clearStack :: Stack -> IO () Source #
clear stack
shrinkStack :: Stack -> Int -> IO () Source #
Shrink the stack. The given arg means the number of discards. therefore, shrink s n == for [1 .. n] $ _ -> pop s
asSizedVec :: Stack -> Vec Source #
converts Stack to sized Vec; this is the method to get the internal vector