intersection method
Elements that appear in both this and other.
Returns a new list of elements present in both iterables.
Implementation
@useResult
List<T> intersection(Iterable<T> other) {
final Set<T> otherSet = other.toSet();
return where((T x) => otherSet.contains(x)).toList();
}