array-forth-0.2.1.4: A simple interpreter for arrayForth, the language used on GreenArrays chips.

Safe HaskellNone
LanguageHaskell98

Language.ArrayForth.Stack

Synopsis

Documentation

empty :: Stack Source

A stack containing only 0s.

push :: Stack -> F18Word -> Stack Source

Pushes the given element on top of the stack, discarding the last element.

pop :: Stack -> (Stack, F18Word) Source

Pops the top of the stack, returning the value and the new stack.

fill :: Stack -> [F18Word] -> Stack Source

Push the given elements onto the stack one-by-one.

data Stack Source

Instances