<div>Dear list members,<br></div><div><br></div><div>While playing around with Racket in DrRacket, I accidently  entered in the interactions window.</div><div>&gt; (define x 7)</div><div>&gt; (define x 8)</div><div><br></div>
<div>and DrRacket allowed it, i.e.  I didn&#39;t get a &quot;duplicate definition of identifiers error message.</div><div><br></div><div><br></div><div>So to try and figure out what was going onI then entered this in the definitions window of DrRacket::</div>
<div><u><strong>Code snippet A</strong></u></div><div>(define-namespace-anchor a)<br>(define ns (namespace-anchor-&gt;namespace a))<br>(eval &#39;(begin (define x 7) (define x 8)) ns)<br>(eval &#39;x  ns)</div><div><br></div>
<div>and still no &quot;duplicate definitions error&quot;.</div><div><br></div><div>I then tried this:</div><div><u><strong>Code snippet B</strong></u></div><div>(define x 9)<br>(define-namespace-anchor a)<br>(define ns (namespace-anchor-&gt;namespace a))<br>
(eval &#39;(begin (define x 7) (define x 8)) ns)<br>(eval &#39;x  ns)</div><div><br></div><div>and I got the error message: &quot;cannot redefine a constant x&quot;..</div><div><br></div><div>Can someone explain to me why in code snippet A  in the definitions window  (and also simply entering (define x 7)  (define x 8) in the interactions window) doesn&#39;t give me a duplicate definitions error.</div>
<div><br></div><div>Many thanks,</div><div>Harry Spier</div><div><br></div>