Concat
Concat[expr1, expr2, ...]
Concat[expr1, expr2, ...] concatenates expressions expr1, expr2, ... into a single list.
Note
You can use Concat both with lists and with individual expressions. Concat treats individual expressions that are not contained in a list the same as a list containing a single expression.
| Example | in | out |
|---|---|---|
| The concatenation of the lists {1,2,3}, {4} and {4,5}. | Concat[ {1,2,3}, {4}, {4,5} ] |
{1,2,3,4,4,5} |
| The concatenation of the expressions 2, 3*4 and {5,6,7+8}. | Concat[2, 3*4, {5,6,7+8} ] |
{2, 3*4, 5, 6, 7+8} |
The concatenation of x, y and z, where they are defined as {1,2,3}, 4 and {5} respectively. |
Concat[x, y, z] |
{1, 2, 3, 4, 5} |
The concatenation of { {1,2},3}, 4 and {5,6}. |
Concat[{ {1,2},3},4,{5,6}] |
{ {1,2},3,4,5,6} |