Re: [racket] Strange behaviour with in-range

2011-12-30 Thread Vincent St-Amour
Also, if you want nested iteration, use `for*'. Vincent At Fri, 30 Dec 2011 17:55:12 -0500, Nadeem Abdul Hamid wrote: > > The for form iterates by drawing an element from each sequence; if any > sequence is empty, then the iteration stops. So this: > > (for ([i (in-range 2 4)] >[j (in-

Re: [racket] Strange behaviour with in-range

2011-12-30 Thread Nadeem Abdul Hamid
The for form iterates by drawing an element from each sequence; if any sequence is empty, then the iteration stops. So this: (for ([i (in-range 2 4)] [j (in-range 1 2)]) (printf "i = ~s j = ~s\n" i j)) produces i = 2 j = 1 at which point, the j sequence is now empty, so the entire i