Hi,

I'd like a version of std.range.chunk that does not require the range to have the "length" property.

As an example, consider a file that you would like parse by lines and always lump together four lines, i.e.

import std.stdio;
void main() {
  auto range = File("test.txt", "r").byLine();
  foreach(c; range.chunks(4)) { //doesn't compile
    writefln("%s %s", c[0], c[1]);
  }
}

Thanks,
Stephan

Reply via email to