Combining infinite ranges
bearophile
bearophileHUGS at lycos.com
Thu Jun 3 05:01:29 PDT 2010
Andrei Alexandrescu:
> My point was that there's no need to sit down and implement
> functionality. Just write
>
> auto enumerate(R)(R r) if (isInputRange!R)
> {
> return zip(iota(0, size_t.max), r);
> }
Right, thank you. A std lib can contain even small functions/HOFs (that are the result of combination of few other things), if they are very commonly useful.
Bye,
bearophile
More information about the Digitalmars-d
mailing list