Regarding std.range.indexed

bearophile bearophileHUGS at lycos.com
Mon Jan 13 18:59:07 PST 2014


Jesse Phillips:

> I thought it was to provide an index number during a foreach 
> iteration.

That's the enumerate() range, that is still missing in Phobos.


> If you have an randomAccess range with assignable elements, why 
> use indexed?

But "source" is immutable, so its elements aren't assignable.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list