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
_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to