<br>Thanks, David. I would be interested in someone walking through how this behavior arises -- as well as the design issue regarding the "hopeless top-level": Is this the least-bad option available or an unexpected consequence?<br>
<br>--Dan<br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 7:30 PM, David Van Horn <span dir="ltr"><<a href="mailto:dvanhorn@ccs.neu.edu" target="_blank">dvanhorn@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/22/12 10:05 PM, Dan Grossman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(define (range lo hi)<br>
(print "hi")<br>
(if (> lo hi) null (cons lo (range (+ 1 lo) hi))))<br>
</blockquote></div>
...<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I apologize if this is a known "feature" or a known "bug" -- I do scan<br>
the release notes briefly when new versions come out, but don't remember<br>
anything about this. Any pointers? Thanks!<br>
</blockquote>
<br></div>
Because I can't do it justice, I will let someone else provide the answer as to why this does what it does (which is an instance of "the top-level is hopeless"), but I just want to point out that I showed this example to two members of the PLT team and asked them to predict how many times "hi" would be printed.<br>
<br>
They both predicted wrong.<br>
<br>
David<br>
<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote></div><br>