public static function all(Iterator $iterator, callable $predicate) : bool
    {
        while ($iterator->valid()) {
            if (!Predicates::call($predicate, $iterator->current())) {
                return false;
            }
            $iterator->next();
        }
        return true;
    }
public static function all(Iterator $iterator, callable $predicate) : bool
    {
        while ($iterator->valid()) {
            if (!Predicates::call($predicate, $iterator->current())) {
                return false;
            }
            $iterator->next();
        }
        return true;
    }
Returns true if every element returned by iterator satisfies the given predicate.
If iterator is empty, true is returned.

@param Iterator $iterator
@param callable $predicate
@return boolean