public static final function some(array $array, PredicateInterface $predicate) : bool { foreach ($array as $key => $value) { if ($predicate->call($value, $key)) { return true; } } return false; }
public static final function some(\Traversable $traversable, PredicateInterface $predicate) : bool { foreach ($traversable as $key => $value) { if ($predicate->call($value, $key)) { return true; } } return false; }