<font color='black' size='2' face='arial'><font face="arial" color="black" size="2">
<div> <br>
</div>
<div> <br>
</div>
<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Dan Grossman <djg@cs.washington.edu><br>
To: David Vanderson <david.vanderson@gmail.com><br>
CC: jkaczorek <jkaczorek@aol.pl>; users <users@racket-lang.org><br>
Sent: Mon, 31 Oct 2011 21:25<br>
Subject: Re: [racket] set! racket behaviour<br>
<br>
<div id="AOLMsgPart_0_15a58947-9904-46d6-8678-0d5f498411cf" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">
<pre style="font-size: 9pt;"><tt>I also found it counterintuitive that
#lang racket
(define x 0)
(set! x 1)
works, but moving the set! out of the module and into the REPL does
not. But Dave has pointed to the exact line in the Guide that makes
this clear: A module-level definition is mutable only if there is a
set! for it in the module. Once you know that "reasonable compromise"
[as I put it in my emerging lecture materials], everything works as
expected.
<br>
<br>
Thanks for all Your responses
</tt></pre>
</div>
<!-- end of AOLMsgPart_0_15a58947-9904-46d6-8678-0d5f498411cf -->
</div>
</font></font>