commutativeIntersection<T> static method

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

Verifies the Commutative Law for Intersection.

Law: A ∩ B = B ∩ A

The order of sets in an intersection operation does not matter.

Implementation

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