<font color='black' size='2' face='arial'><font face="arial" color="black" size="2">
<div> <br>
</div>
<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_be12f438-0e90-404d-bb4b-b38c91c99426" 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>
Thanks for all Your responses<br>
<br>
Jerzy <br>
</tt></pre>
</div>
<!-- end of AOLMsgPart_0_be12f438-0e90-404d-bb4b-b38c91c99426 -->
</div>
</font></font>