compare method

bool compare(
  1. T a,
  2. T b
)

Implementation

bool compare(T a, T b) => compareItems?.call(a, b) ?? a == b;