Concatenate Arrays (Map, Join methods)



Concatenate Arrays with Map and Join methods
Smart pascal source code
var a: array of Integer; begin a := [1] + [2, 3] + [4]; Writeln(a.Map(IntToStr).Join(',')); // 1,2,3,4 a := a + [5, 6]; Writeln(a.Map(IntToStr).Join(',')); // 1,2,3,4,5,6 a := [0] + a; Writeln(a.Map(IntToStr).Join(',')); // 0,1,2,3,4,5,6