Logo

Programming-Idioms

  • C++
  • Clojure

Idiom #226 Delete last element from list

Remove the last element from the list items.

(drop-last items)
items.pop_back();

Removes last element from items, without returning anything.

If items is already empty, then behaviour is undefined.
with Ada.Containers.Vectors;
Items.Delete_Last (Count => 1);

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