Logo

Programming-Idioms

Remove the last element from list items.
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
with Ada.Containers.Vectors;
Items.Delete_Last (Count => 1);
(drop-last items)
items.pop_back();
items.RemoveAt(items.Count - 1);
items.removeLast();
items = items(1:size(items)-1)
items = items[:len(items)-1]
pop :: [a] -> [a]
pop [] = []
pop xs = init xs

let items2 = pop items
let items2 = init items
items.pop();
import java.util.List;
items.remove(items.size() - 1);
array_pop($items);
uses Classes;
items.delete(items.count-1);
pop(@items);
items.pop()
items.pop
items.pop();