Ruby-style "each" in D?

monarch_dodra monarchdodra at gmail.com
Wed Mar 19 09:45:13 PDT 2014


On Wednesday, 19 March 2014 at 16:09:31 UTC, Dicebot wrote:
> On Wednesday, 19 March 2014 at 16:04:16 UTC, Andrei 
> Alexandrescu wrote:
>> tee is already being discussed -- Andrei
>
> On this topic, do we have something like "consume" in Phobos to 
> eagerly iterate through the supplied range?

I had proposed "walk", which would be consistent with the already 
existing "walkLength".

An "each()" with no arg could also do the trick, but that would 
also call the "front", which means it's not the exact same 
behavior (not better or worst, just different).


More information about the Digitalmars-d mailing list