is similar to
, except that the bindings of the
variables are performed sequentially from left to right, and each binding is made in an environment in which all of the preceding bindings are visible. For example
(let* ((x 3) (y (+ x 2)) (z (+ x y 5))) (* x z))
. Explain how a
expression can be rewritten as a set of nested
expressions, and write a procedure
that performs this transformation. If we have already implemented
) and we want to extend the evaluator to handle
, is it sufficient to add a clause to
whose action is
(eval (let*->nested-lets exp) env)
or must we explicitly expand
in terms of non-derived expressions?
There are no comments yet.
You must log in to post a comment.Login