Join two or more lists into one list using Concat() or the || operator. The original lists are not changed.
a = {1, 2};
b = {7, 8, 9};
Concat( a, b );
{1, 2, 7, 8, 9}
The following example joins the same lists using the || operator:
{1, 2} || {7, 8, 9}
{1, 2, 7, 8, 9}
d = {"apples", "bananas"};
e = {"oranges", "grapes"};
f = {1, 2, 3};
Concat( d, e, f);
{"apples", "bananas", "oranges", "grapes", 1, 2, 3}
Join two or more lists and replace the first list with the combined list using Concat to() or the ||= operator.
d = {"apples", "bananas"};
e = {"peaches", "pears"};
Concat to(d,e);
Show( d );
d = {"apples", "bananas", "peaches", "pears"}
The following example joins the same lists using the ||= operator:
d = {"apples", "bananas"};
e = {"peaches", "pears"};
d||=e;
Show( d );
d = {"apples", "bananas", "peaches", "pears"}