[Issue 17238] r.lookaround!(a, b) returns a range derived from r that allows a elements of lookahead and b elements of lookback

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 1 17:54:13 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17238

--- Comment #2 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to greenify from comment #1)
> A couple of questions to clarify:
> 
> 1) popFront/popBack will move the fixed-size buffer, right?
> For example:
> 
> 10.iota.ahead(3).drop(2).writeln; // [2, 3, 4]

ahead(k) returns the kth element ahead of front, not a range.

> 2)
> > it embeds a fixed-size buffer and moves through it with minimal effort.
> 
> It's assumed are only shallow which can change?

Affirmative.

--


More information about the Digitalmars-d-bugs mailing list