combination expressions
take an expression like
- (* (+ 2 (* 4 6)) (+ 3 5 7))
tree evaluation
- unmarked nodes are values to be computed
- to evaluate an expression, must first evaluate its parts
- but parts can be evaluated in any order
general rule for evaluating expressions
- to evaluate (f e1 e2 …), where f and ei may all be combination exprs:
- *evaluate f –> F
- evaluate each ei -> Ei
- apply the value F (a procedure) to the values Ei
* a small lie. in fact, f need not be evaluated first