On 2/28/13 10:24 AM, Jacob Carlborg wrote:
On 2013-02-28 16:18, Andrei Alexandrescu wrote:

I think it belongs to std.range.

1. tap!fun(r) returns a new range (of a new type R1 distinct from
typeof(r)). Upon the first call to .front without an intervening
popFront, fun(r.front) is called.

2. tap!(fun1, fun2)(r) also returns a new range, calls fun1 as described
above, and fun2 whenever popFront() gets called without the front()
being looked at. So fun1 tracks the looked-at data and fun2 tracks the
ignored data.

That is not my idea of "tap". This is my idea of "tap":

Object (func) (Object o)
{
func(o);
return o;
}

I know. I think my tap is better than your tap.

Andrei


Reply via email to