To evaluate a postfix expression, you need a stream of tokens and a stack that holds tokens. For example, to evaluate 2 3 +, you read in the tokens one at a time, from left to right, and apply the ...
This is a literate Haskell page: you can load it directly into ghci by following these steps. Haskell uses an evaluation strategy known as lazy evaluation. The basic idea is that an expression is not ...