identityUnion<T> static method

bool identityUnion<T>(
  1. CustomSet<T> a
)

Verifies the Identity Law for Union.

Law: A ∪ ∅ = A

The union of any set with the empty set equals the original set.

Implementation

static bool identityUnion<T>(CustomSet<T> a) {
  final empty = CustomSet<T>.empty();
  return SetOperations.union(a, empty).equals(a);
}