Logo

Programming-Idioms

  • D
  • Erlang
  • Pascal

Idiom #291 Remove sublist

Delete all the elements from index i (included) to index j (excluded) from the list items.

for index := j-1 downto i do
  items.delete(index);
items.removeRange(i, j);

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