Homework #21


This problem requires and Lectures 17 and 18 and book sections 3.4-3.5.

Part A - Sequential 'let' - (60 minutes)
This exercise is not from the book. Modify the semantics of let given in Section 3.4 so that clauses in the let expression are executed sequentially and their binding takes affect in the next clause (like Scheme's let*). Thus:

    let x = 5 
        y = add1(x)
      in +(x,y)

would return 11 because the x in the second clause refers to the binding in the previous clause.

Part B - Exercise 3.20, p.89 - (30 minutes)
Modify the interpreter to signal an error if a closure is called with the wrong number of arguments.
The simple interpreter with if, let, proc, and app expressions.


You must log in first before submitting homework assignments.

Instructions on submitting homework is here


Last updated at 3:40 pm on Tuesday, October 19, 2004.