Re: [racket] Continuations & side effects

2013-01-06 Thread Matthias Felleisen
Part of the problem is that you are running your program within a module. Unless a variable x is explicitly designated as assignable via (set! x ...), the execution of a module makes the variable immutable. You can see how it all gets expanded with the macro stepper (disable hiding): (module

[racket] Continuations & side effects

2013-01-06 Thread Jean-Michel HUFFLEN
Hello, Racket users! Here is an example I difficultly understand: #lang scheme (define saved '*dummy-value*) (define next-year (+ 1 (call/cc (lambda (g) (set! saved g) 1997 (saved 2012) In some other interpreters, it is OK. But Racket's answer is: define-values: cannot re-define a