https://issues.dlang.org/show_bug.cgi?id=13590
Brad Anderson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Brad Anderson <[email protected]> --- > It exposes a more general problem - given a Range of a Range of Elements, how > does one iterate over Elements? Well, rng.joiner.chunks(4) comes to mind normally but that, of course, breaks down is with things like byChunk and byLine where the buffer is overwritten as you process the range. Dmitry had an idea for how to solve it so you could do things much more naturally while still being extremely efficient. The thread about it: http://forum.dlang.org/post/[email protected] His idea kind of evolves as the thread goes on so read more than the first post. As far as I know he's still planning on hammering out the details and making another proposal. If memory serves me, with his proposal end users would be able to just do rng.chunks(4) to accomplish this (with chunks implementation taking advantage of the new buffer range primitives). --
