Re: arithmetic issues Thomas Bushnell BSG 25 Oct 2005 19:48 UTC

Per Bothner <xxxxxx@bothner.com> writes:

> Thomas Bushnell BSG wrote:
>> Where is the Scheme function which modifies closures?
>
> set!
>
> as in:
>
> (let ((i 0))
>   (lambda ()
>     (set! i (+ i 1))
>     i))

set! is incapable of modifying a closure which has not been set up for
it.

The procedure (lambda () 5) is not modifiable.  There is no procedure
which modifies it.  It is therefore atomic by the previously given
definition.

Thomas