difference<T> function
Set operations
Returns a new set containing every value in iterable
that is not in any of
the others
iterables.
difference([0, 1, 2, 0], [[1]]); // {0, 2}
Implementation
Set<T> difference<T>(Iterable<T> iterable, Iterable<Iterable<Object?>> others) {
var set = Set.of(iterable);
for (final other in others) {
for (final o in other) {
set.remove(o);
}
}
return set;
}