src/Eventually.php
public function bind(callable $codeBlock)
    {
        assert($this->result === null, "'Eventually' instance may not be mutated after code-block execution.");

        return static::unit(function ($success) use ($codeBlock) {
            $this->run(function ($value) use ($codeBlock, $success) {
                return $codeBlock($value)->run($success);
            });
        });
    }
public function bind(callable $codeBlock)
    {
        assert($this->result === null, "'Eventually' instance may not be mutated after code-block execution.");

        return static::unit(function ($success) use ($codeBlock) {
            $this->run(function ($value) use ($codeBlock, $success) {
                return $codeBlock($value)->run($success);
            });
        });
    }
public function bind ( callable $ codeBlock ) { assert ( $ this -> result === null , "'Eventually' instance may not be mutated after code-block execution." ) ; return static :: unit ( function ( $ success ) use ( $ codeBlock ) { $ this -> run ( function ( $ value ) use ( $ codeBlock , $ success ) { return $ codeBlock ( $ value ) -> run ( $ success ) ; } ) ; } ) ; }
Binds the given callable to the monad's managed code-block's successful execution.

@param callable $codeBlock Is expected to return an instance of Eventually.

@return Eventually
Binds the given callable to the monad s managed code - block s successful execution .