any method
Returns true
if at least one element matches the given predicate
.
Implementation
bool any(bool predicate(T element)) {
if (this.isEmptyOrNull) return false;
for (final element in this.orEmpty()) if (predicate(element)) return true;
return false;
}