On 2015-12-04 17:37, Andrei Alexandrescu wrote:
Like "tail" in Unix. Given a range R r and a number size_t n, return a
TakeExactly!R that's r at no more than n steps from its end:

TakeExactly!R advanceWithin(R)(R r, size_t n)
if (isForwardRange!R);

Invariant:

assert(r.advanceWithin(n).length <= n);

Implementation would send a scout range ahead, etc.

I didn't file an issue for it, but it's a great function to have.

retro + take?

--
/Jacob Carlborg

Reply via email to