any method

bool any([
  1. bool test(
    1. MapEntry<K, V> entry
    )?
])

Returns true if at least one entry passes the given test or Map has at least one entry.

Implementation

bool any([bool Function(MapEntry<K, V> entry)? test]) {
  for (final entry in entries) {
    if (test?.call(entry) ?? true) return true;
  }

  return false;
}