Returns true if the two values are equal according to the compare function.
@override bool equals(Either<A, B> x, Either<A, B> y) => compare(x, y) == 0;