Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #226 Delete last element from list

Remove the last element from list items.

items = items[:len(items)-1]
items.pop_back();
items.RemoveAt(items.Count - 1);
pop :: [a] -> [a]
pop [] = []
pop xs = init xs
items.pop();
import java.util.List;
items.remove(items.size() - 1);
array_pop($items);
Classes
items.delete(items.count-1);
items.pop()
items.pop
items.pop();

New implementation...
programming-idioms.org