xor method

bool Function() xor(
  1. bool predicate()
)

Compose xor this function with predicate.

Implementation

bool Function() xor(bool Function() predicate) => () {
      final thisPredicate = this();
      final otherPredicate = predicate();
      return thisPredicate ? !otherPredicate : otherPredicate;
    };