or<T> static method

Predicate<T> or<T>(
  1. List<Predicate<T>> predicates
)

Implementation

static Predicate<T> or<T>(List<Predicate<T>> predicates) {
  return (T arg) {
    if (arg == null) {
      assert(false, 'Argument cannot be null');
    }
    for (final predicate in predicates) {
      if (predicate(arg)) return true;
    }
    return false;
  };
}