Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C++
#include <list>
items.emplace_front(x);

c++ 11
#include <list>
items.push_front(x);

any c++
(def items2 (conj items x))

conj take a list and an item, in that order, and appends the item to the list at the front.

New implementation...
< >
programming-idioms.org