[racket-dev] exact nonnegative integers as sequences?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Apr 18 09:25:54 EDT 2011

I often write

 (for.... ([i (in-range N)]) ...)

In cases where the loop overhead is not significant (i.e., I don't care
whether the compiler can tell that I'm iterating through integers), it
would be nice to write just

 (for.... ([i N]) ...)

which would require that integers are treated as sequences.

Would anyone object to making an exact, nonnegative integer `N' a
sequence equivalent to `(in-range N)'?

Posted on the dev mailing list.