On Friday, 14 September 2018 at 20:43:45 UTC, SrMordred wrote:
What you want is std.range.chunksauto a = [1,0,1,1,1,0,1,0,1,1,1,1,0]; a.map!(to!string) .join("") .chunks(4).map!(to!string) //donĀ“t know why the chunks are not already strings at this point ;/.writeln;
It's easier if you chunk before joining: auto a = [1,0,1,1,1,0,1,0,1,1,1,1,0]; a.map!(to!string) .chunks(4) .map!join .writeln;