previous | index | next

Reducing the Stack

Reduction of the stack is done by reduce!

Recall that there are two kinds of reduction:

  1. When the stack looks like:

    ... ( N )

    then reduce to:

    ... N

  2. When the stack looks like:

    ... N1 op N2

    then reduce to:
    ... val

    where val is the result of applying op to N1 and N2


previous | index | next