[racket] Strange behaviour with in-range

From: Charles Turner (chturne at gmail.com)
Date: Fri Dec 30 17:49:50 EST 2011

I'm noticing some unexpected behaviour with in-range:

> (for ([i (in-range 2 4)])
  (printf "i = ~s\n" i))
i = 2
i = 3

that works as expected, but:

> (for ([i (in-range 2 4)]
        [j (in-range 1 2)])
  (printf "i = ~s\n" i))
i = 2

why isn't '3' being picked up in the second example?

Thanks,
       Charles.


Posted on the users mailing list.