On 10/22/12 10:05 PM, Dan Grossman wrote:
(define (range lo hi) (print "hi") (if (> lo hi) null (cons lo (range (+ 1 lo) hi))))
...
I apologize if this is a known "feature" or a known "bug" -- I do scan the release notes briefly when new versions come out, but don't remember anything about this. Any pointers? Thanks!
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.
They both predicted wrong. David ____________________ Racket Users list: http://lists.racket-lang.org/users