Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C++

Idiom #166 Concatenate two lists

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

auto ab = a;
ab.insert (ab.end (), b.begin (), b.end ());
(def ab (concat a b))

New implementation...