a new evaluation rule
Scheme’s evaluation rule for applications: call by value
- to evaluate a combination expression
evaluate the parts
then apply the value of the operator to the values of the operands
- to apply a procedure
bind the parameters to the argument values ina fresh frame hung off the proc’s env
evaluate the body of the procedure in the new environment
a new rule: call by name
- to evaluate a combination expression
evaluate the operator
apply the operator to the operand expressions
- to apply a procedure
evaluate the body of the procedure in its environment
when a parameter value is needed, evaluate the corresponding argumentin its environment