You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
595 B
18 lines
595 B
|
|
Exercise 4.16: In this exercise we implement the
|
|
method just described for interpreting internal definitions. We assume that
|
|
the evaluator supports let (see Exercise 4.6).
|
|
|
|
|
|
Change lookup-variable-value (4.1.3) to signal an error if
|
|
the value it finds is the symbol *unassigned*.
|
|
|
|
Write a procedure scan-out-defines that takes a procedure body and
|
|
returns an equivalent one that has no internal definitions, by making the
|
|
transformation described above.
|
|
|
|
Install scan-out-defines in the interpreter, either in
|
|
make-procedure or in procedure-body (see 4.1.3).
|
|
Which place is better? Why?
|
|
|
|
|
|
|