This language bar is your friend. Select your favorite languages!

Idiom #166 Concatenate two lists

Create list ab containing all the elements of list a, followed by all elements of list b.

ab = a ++ b
auto ab = a;
ab.insert (ab.end (), b.begin (), b.end ());
int[] a, b;
auto ab = a ~ b;
int[] a, b;
auto ab = chain(a, b);
var ab []T
ab = append(append(ab, a...), b...)
ab := append(a, b...)
ab := make([]T, len(a)+len(b))
copy(ab, a)
copy(ab[len(a):], b)
ab = a ++ b
var ab = a.concat(b);
$ab = array_merge($a, $b);
  a,b,ab: TList;

  ab := TList.Create;
ab = a + b
ab = a + b
let ab = [a, b].concat();
val ab = a ++ b

Do you know the best way to do this in your language ?
New implementation...

Idiom created by