Assign a single chunk of values to an array, altering the array first.
int[6] foo; foreach (i; 0 .. foo.length/2) { foo[].assignChunk!(a => cast(int) i*2 + a)(i, 1, 2); } assert(foo == [1, 2, 3, 4, 5, 6]);
See Implementation
Assign a single chunk of values to an array, altering the array first.