SICP exercise 1.34

From Drewiki

Jump to: navigation, search

Problem

Suppose we define the procedure:

 

Then we have

 

What happens if we (perversely) ask the interpreter to evaluate the combination (f f)? Explain.

Solution

Let's use the substitution model to illustrate:

 

The combination (2 2) is an error, since 2 is neither a primitive nor a compound procedure.

Personal tools