[racket] Are these in-cycle semantics intentional?

From: Neil Toronto (neil.toronto at gmail.com)
Date: Thu Nov 24 22:57:10 EST 2011

In the following program, "loop 2 finished" is never printed, even 
though `i' loops over nothing. As far as I understand, the second loop 
shouldn't iterate at all - it should stop as soon as the `i' sequence is 
finished, which is immediately. But I could be wrong, so I'm asking: is 
this a bug?


#lang racket

(for ([i  (in-list empty)]
       [j  (in-cycle '(1))])
   (printf "i = ~v~n" i))

(printf "loop 1 finished~n")

(for ([i  (in-list empty)]
       [j  (in-cycle empty)])
   (printf "i = ~v~n" i))

(printf "loop 2 finished~n")


Neil T


Posted on the users mailing list.