lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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