Logo

Programming-Idioms

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

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.

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

New implementation...