range.save
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 23 17:09:03 PST 2015
On Tuesday, 24 November 2015 at 01:03:36 UTC, Steven
Schveighoffer wrote:
> But yes, a fundamental requirement is to be able to get the
> front element repeatedly. This necessitates a buffer or "saving
> of state".
Either that or the same operation/calculation is done every time
you call front, and it results in the same value (e.g. the result
of map calls its predicate every time that you cal front on it).
In any case, regardless of how it's done, front needs to always
return the same value until popFront is called, and how that's
done can vary.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list