More pathological range subtleties

Benjamin Thaut code at benjamin-thaut.de
Tue Feb 12 12:29:57 PST 2013


Am 12.02.2013 21:22, schrieb H. S. Teoh:
>
> Note that .front returns a slice of _src. But this slice is constructed
> *each time* you call .front. Which means the slice that fun called
> .popFront on has no effect on the range at all. So fun will return the
> original range in this case -- this is case (3).
>

But fun never calls front, fun calls popFront and popFront does indeed 
change the internal slice?

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list