[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Closure of lexical environment in Scheme closures
- From: Mark Hamburg <mhamburg@...>
- Date: Fri, 12 Nov 2004 09:42:11 -0800
set! modifies the pairs within an environment by changing the value portion
of the pair. The name is not replaced by the value, it is looked up in the
environment. Since the environment is mutable, the value associated with the
name is mutable. Since the environment may be shared with other functions,
the pair can be changed in multiple places.
Lua may not have lambda calculus closures, but it has the same closures as
Scheme. See SICP, Chapter 3. In the absence of assignment, these work just
like lambda calculus closures.
Mark