[plt-scheme] Semantics of let

From: Greg Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Thu Feb 23 18:55:28 EST 2006

--- Jim Blandy <jimb at red-bean.com> wrote:

> Semantics: A lambda expression evaluates to a procedure. The
> environment in effect when the lambda expression was evaluated is
> remembered as part of the procedure. When the procedure is later
> called with some actual arguments, the environment in which the
> lambda
> expression was evaluated will be extended by binding the variables in
> the formal argument list to fresh locations, the corresponding actual
> argument values will be stored in those locations, and the
> expressions
> in the body of the lambda expression will be evaluated sequentially
> in
> the extended environment.
> So that's kind of a recipe for how to implement it as well.

Thanks. I'll try associating a hash table with each lambda expression
in the environment. (There's probably something wrong with THAT
idea,too, but well, we'll see.)

Gregory Woodhouse  <gregory.woodhouse at sbcglobal.net>
"All truth passes through three stages: First, it is ridiculed.
Second, it is violently opposed. Third, it is accepted as
being self-evident."
--Arthur Schopenhauer

Posted on the users mailing list.