[racket-dev] exact nonnegative integers as sequences?

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Apr 18 11:15:06 EDT 2011

A few seconds ago, Matthew Flatt wrote:
> At Mon, 18 Apr 2011 11:04:18 -0400, Eli Barzilay wrote:
> > An hour and a half ago, Matthew Flatt wrote:
> > > 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
> > 
> > What's the overhead?
> 
> The same as using `(in-range N)' as a value: an indirection on the
> `(curry = N)' test, `add1' increment, and identity conversion from
> the loop index to the loop value. [...]

Ugh.  I completely misread the above as:

| 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

and thought that the new thing is supposed to fixed that overhead...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.