none method

bool none([
  1. bool predicate(
    1. T
    )?
])

Returns true if the collection has no elements or no elements match the given predicate.

Implementation

bool none([bool Function(T)? predicate]) {
  if (this is KtCollection && (this as KtCollection).isEmpty()) return true;
  if (predicate == null) return !iterator().hasNext();
  for (final element in iter) {
    if (predicate(element)) {
      return false;
    }
  }
  return true;
}