any method

bool any(
  1. bool test(
    1. T element
    )
)

Checks if at least one element satisfies a given condition

Implementation

bool any(bool Function(T element) test) {
  for (var element in this) {
    if (test(element)) return true;
  }
  return false;
}