public function exists(\Closure $closure): bool
    {
        // init
        $isExists = false;

        foreach ($this->getGenerator() as $key => $value) {
            if ($closure($value, $key)) {
                $isExists = true;

                break;
            }
        }

        return $isExists;
    }
public function exists(\Closure $closure): bool
    {
        // init
        $isExists = false;

        foreach ($this->getGenerator() as $key => $value) {
            if ($closure($value, $key)) {
                $isExists = true;

                break;
            }
        }

        return $isExists;
    }
public function exists ( \ Closure $ closure ) : bool { // init $ isExists = false ; foreach ( $ this -> getGenerator ( ) as $ key => $ value ) { if ( $ closure ( $ value , $ key ) ) { $ isExists = true ; break ; } } return $ isExists ; }
Check if a value is in the current array using a closure.

@param \Closure $closure

@return bool
<p>Returns true if the given value is found, false otherwise.</p>
Check if a value is in the current array using a closure .