[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redefining locals
- From: "Aaron Brown" <aaron-lua@...>
- Date: Thu, 11 Nov 2004 14:17:09 -0500
I just ran the following through Guile (the Gnu version of
Scheme) and got "baz".
(let ((foo 'bar))
(define func (lambda ()
(set! foo 'baz) ;; Alters the foo within func.
The Lua equivalent (which also gives "baz") is
local foo = "bar"
end -- func
foo = "baz" -- Alters the foo within func.
Guile is the only lexically scoped Lisp I have access to
from my current location, but my understanding is that any
modern lexically scoped Lisp would work the same way.