protocol for using InputRanges
Jakob Ovrum
jakobovrum at gmail.com
Sat Mar 22 17:53:31 PDT 2014
On Sunday, 23 March 2014 at 00:50:34 UTC, Walter Bright wrote:
> 2. Can r.front be called n times in a row? I.e. is calling
> front() destructive?
>
> If true, this means that r.front will have to cache a copy in
> many cases.
If `front` was destructive there would be little point in having
it separate from `popFront`. I think it must be non-destructive
to make sense.
More information about the Digitalmars-d
mailing list