public static function all(Iterator $iterator, callable $predicate) : bool
    {
        while ($iterator->valid()) {
            if (!Predicates::call($predicate, $iterator->current())) {
                return false;
            }
            $iterator->next();
        }
        return true;
    }