On Thursday, 5 July 2018 at 14:30:05 UTC, Dukc wrote:
> foreach(j, ref piece; cast(int[4][]) a)
> { auto pieceI = j * 4;
> static foreach(i; 0 .. piece.length) piece[i] = pieceI + i;
> }
>
> Can probably be made even better by designing some template
> helper.
Thanks! The cast to an array of int[4]s is just hilarious.