distinct method

Iterable<T> distinct()

Returns an Iterable in which duplicate elements are pruned.

Implementation

Iterable<T> distinct() sync* {
  for (final element in toSet()) {
    yield element;
  }
}