For simplicity, postfix notation is used, i.e., to compute 3+4 you enter 3 Ent 4 +.
Here is the source code:
placerF
(as in Example 4)
and the placer
matrixP
which has the number of columns as an argument.
calc
) is a stack (represented
as a list) of numbers. The function calc
pushes
and pops numbers from the stacks as appropriate. The last
clause in the definition means that nothing happens if
there are too few values on the stack for an operation.