Task

Show how to concatenate two arrays in your language.



If this is as simple as array1 + array2, so be it.




u: [1, 2, 3, 4]$
v: [5, 6, 7, 8, 9, 10]$
append(u, v);
/* [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] */
 
/* There are also functions for matrices */
 
a: matrix([6, 1, 8],
          [7, 5, 3],
          [2, 9, 4])$
 
addcol(a, ident(3));
/* matrix([6, 1, 8, 1, 0, 0],
          [7, 5, 3, 0, 1, 0],
          [2, 9, 4, 0, 0, 1]) */
 
addrow(a, ident(3));
/* matrix([6, 1, 8],
          [7, 5, 3],
          [2, 9, 4],
          [1, 0, 0],
          [0, 1, 0],
          [0, 0, 1]) */