On Friday, 4 April 2014 at 20:19:53 UTC, Olivier Grant wrote:

iterate a slice by a certain number of elements at a time such that :

foreach(s; [1,2,3,4].splice!(2))
{
   writeln(s);
}

would print :

[1,2]
[3,4]

First of all, is there such a function in D's standard library as I didn't seem to be able to find one ?

std.range.chunks

Reply via email to