std.array.array seems to return flatten copy of input
anonymous
anonymous at example.com
Fri Apr 4 13:23:17 PDT 2014
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
More information about the Digitalmars-d-learn
mailing list