exceptElement method

Iterable<E> exceptElement(
  1. E element
)

Returns a new lazy Iterable containing all elements of this collection except the given element.

Implementation

Iterable<E> exceptElement(E element) sync* {
  for (var current in this) {
    if (element != current) yield current;
  }
}