commutativeUnion<T> static method

bool commutativeUnion<T>(
  1. CustomSet<T> a,
  2. CustomSet<T> b
)

Verifies the Commutative Law for Union.

Law: A ∪ B = B ∪ A

The order of sets in a union operation does not matter.

Implementation

static bool commutativeUnion<T>(CustomSet<T> a, CustomSet<T> b) =>
    SetOperations.union(a, b).equals(SetOperations.union(b, a));