Due Tuesday, February 25, 11:59pm.
Start with your solution to assignment 4 (or our solution).
letrec as an extension to your interpreter's
functionality (and not as a macro expansion exercise). Add
this functionality by making the letrec form
behave like the syntax expansion method (which uses
let and set!), but create the
environments and mutate them yourself.
delta instead of
lambda. References to variables that occur
free in a delta form are resolved in the environment in
which the procedure created by evaluation of the delta form
was invoked. Thus in a program that used only delta binding
forms (no let, letrec, or lambda forms) variable references
would all be resolved according to the dynamic scope rule.
Of course a program that did not use the delta form would
use entirely static scope. (See EOPL Exercise 5.7.4
for an implementation hint.)
strange.
The preliminary remarks of the third assignment apply.
It is suggested that you use the new grammar checker.
For a list of test cases, take a look at this sample scheme interaction output.