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;
}

--
/Jacob Carlborg

Reply via email to