public function find(\Closure $closure)
    {
        foreach ($this->getGenerator() as $key => $value) {
            if ($closure($value, $key)) {
                return $value;
            }
        }

        return false;
    }
public function find(\Closure $closure)
    {
        foreach ($this->getGenerator() as $key => $value) {
            if ($closure($value, $key)) {
                return $value;
            }
        }

        return false;
    }
public function find ( \ Closure $ closure ) { foreach ( $ this -> getGenerator ( ) as $ key => $ value ) { if ( $ closure ( $ value , $ key ) ) { return $ value ; } } return false ; }
Find the first item in an array that passes the truth test,
otherwise return false

@param \Closure $closure

@return false|mixed
<p>Return false if we did not find the value.</p>
Find the first item in an array that passes the truth test otherwise return false