associativeUnion<T> static method
Verifies the Associative Law for Union.
Law: A ∪ (B ∪ C) = (A ∪ B) ∪ C
The grouping of sets in a union operation does not matter.
Implementation
static bool associativeUnion<T>(
CustomSet<T> a,
CustomSet<T> b,
CustomSet<T> c,
) {
final left = SetOperations.union(a, SetOperations.union(b, c));
final right = SetOperations.union(SetOperations.union(a, b), c);
return left.equals(right);
}