Ruby-style "each" in D?
Dicebot
public at dicebot.lv
Fri Mar 21 06:33:20 PDT 2014
On Friday, 21 March 2014 at 13:27:04 UTC, Vladimir Panteleev
wrote:
> On Friday, 21 March 2014 at 13:24:50 UTC, Dicebot wrote:
>> On Friday, 21 March 2014 at 12:55:09 UTC, Jacob Carlborg wrote:
>>> What's the purpose of "tee", is it the same as "tap"? "tap"
>>> in Ruby just returns the receiver after executing a block.
>>> This would be the implementation in D:
>>
>> Yeah "tee" is a horrible name, no chance I would have guess
>> what it means just by the name. "tap" is much better.
>
> I think it's meant to mimic the UNIX command with the same
> name? If you know about the command, the function's purpose
> seems obvious.
...and has pretty much nothing in common with it! Also I don't
see "requires UNIX familiarity to be used intuitively" warning in
Phobos docs. Actually for similar reasons "tap" is also inferior
to "each".
More information about the Digitalmars-d
mailing list