except method

Iterable<E> except(
  1. Iterable<E> elements
)

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

Implementation

Iterable<E> except(Iterable<E> elements) sync* {
  for (var current in this) {
    if (!elements.contains(current)) yield current;
  }
}