public function bind(callable $codeBlock)
    {
        return static::unit(function ($result) use ($codeBlock) {
            $result = $this->run($result);
            if ($result instanceof Success) {
                return $codeBlock($result);
            } else {
                return $result;
            }
        });
    }
public function bind(callable $codeBlock)
    {
        return static::unit(function ($result) use ($codeBlock) {
            $result = $this->run($result);
            if ($result instanceof Success) {
                return $codeBlock($result);
            } else {
                return $result;
            }
        });
    }
public function bind ( callable $ codeBlock ) { return static :: unit ( function ( $ result ) use ( $ codeBlock ) { $ result = $ this -> run ( $ result ) ; if ( $ result instanceof Success ) { return $ codeBlock ( $ result ) ; } else { return $ result ; } } ) ; }
Returns a new Attempt monad that is bound to the given code-block.

@param callable $codeBlock

@return Attempt
Returns a new Attempt monad that is bound to the given code - block .