From: dmh@tibco.COM (David Hull)
Date: 3 Sep 1996 17:47:25 -0400
> (define foo 0)
> (define (inc-foo!)
(set! foo (+ foo 1))
(format #t "Foo is ~a\n" foo))
Foo is 1
> (run (begin (inc-foo!)))
Foo is 2
This is puzzling at best. Evidently, inside the (run (begin ...))
form, inc-foo! sees a copy of foo, not the global itself. Is this
deliberate? Is it penance for side-effecting a global variable?
If I set a variable in one scsh process, that doesn't change its value in
another scsh process, right? Even if the two scsh processes are related
by fork(). The RUN operator delimits a process boundary.