On 02/28/2013 06:08 PM, Andrei Alexandrescu wrote:
...So my thought on the subject - I don't care much for T tap(alias func)(T x) { func(x); return x; }
I'm not sure who would.
template tap(alias func){ T tap(T)(T x){ func(x); return x; } }
It's the kind of chaff that doesn't do any real work and only dilutes the value of a library, but I do think a tap tapping into a range does real work and would be a valuable addition. ...
map!(tap!func)
