removeAll method

void removeAll(
  1. T item
)

Remove all occurrences of item from the list.

Implementation

void removeAll(T item) {
  while (contains(item)) {
    remove(item);
  }
}