CS 3520 Homework 4   - Due September 25

Place all of the requested functions in a single file, hw4.scm, and hand it in with submit on the CS filesystem.

Exercise 4.1, Let*

Starting with the implementation of the EoPL 3.5 language in hw4.scm, extend the interpreter with a let* form that acts like Scheme's let*. For example, the program
let* x = 10
     y = x
 in y
should evaluate to 10, and the program
let* f = proc(x) +(x, x)
     g = proc(y) +((f y), (f y))
 in (g 10)
should evaluate to 40.

You will have to modify the grammar to add the new let* form.

Hint: consider writing a helper function
eval-rand-sequence : list-of-sym list-of-expr env -> env
to implement let*.


Last update: Tuesday, September 18th, 2001
mflatt@cs.utah.edu