subtract method

Set<T> subtract(
  1. Iterable<T> other
)

Returns a set containing all elements that are contained by this collection and not contained by the specified collection.

Implementation

Set<T> subtract(Iterable<T> other) {
  final set = toSet();
  set.removeAll(other);
  return set;
}