Get rid of isInfinite()?
Mehrdad
wfunction at hotmail.com
Mon Jun 25 20:40:10 PDT 2012
On Monday, 25 June 2012 at 23:03:59 UTC, Jonathan M Davis wrote:
> You could store those elements internally as you iterate over
> them
That's *precisely* the point of my wrapper... sorry if that
wasn't clear.
Why shouldn't that be sufficient for making it random-access?
> If you can somehow figure out how to do that via buffering,
> then you could make it a forward range as well as whatever
> other range types you could define the functions for, but you'd
> have to figure out a way to define save.
OK, now we're at the same place. :P
What I'm saying is, I __CAN__ get the buffering to work.
What I __cannot__ figure out what to do with is 'length'... I
can't think of anything reasonable to return, since it's not
infinite (which I might represent as ulong.max, if anything) but
it's unbounded.
So the _ONLY_ problem I'm running into right now is length() --
any ideas how I could fix that?
More information about the Digitalmars-d
mailing list