Set operations topic

Logical operations on sets.

Functions

difference<T>(Iterable<T> iterable, Iterable<Iterable<Object?>> others) Set<T> Set operations
Returns a new set containing every value in iterable that is not in any of the others iterables.
disjoint<T>(Iterable<Object?> a, Iterable<Object?> b) bool Set operations
Returns true if a and b are disjoint: if a and b contain no shared value.
intersection<T>(Iterable<T> iterable, Iterable<Iterable<Object?>> others) Set<T> Set operations
Returns a new set containing every (distinct) value that appears in all of the given iterables.
subset<T>(Iterable<Object?> a, Iterable<Object?> b) bool Set operations
Returns true if a is a subset of b: if every value in the given iterable a is also in the given iterable b.
superset<T>(Iterable<Object?> a, Iterable<Object?> b) bool Set operations
Returns true if a is a superset of b: if every value in the given iterable b is also in the given iterable a.
union<T>(Iterable<Iterable<T>> iterables) Set<T> Set operations
Returns a new set containing every (distinct) value that appears in any of the given iterables.