PHP Interface Widmogrod\Monad\Either\Either

Inheritance: extends Widmogrod\FantasyLand\Monad, extends Widmogrod\Common\ValueOfInterface
ファイルを表示 Open project: widmogrod/php-functional Interface Usage Examples

Public Methods

Method Description
either ( callable $left, callable $right ) : mixed Depending on if is Left or is Right then it apply corresponding function

Method Details

either() public method

Depending on if is Left or is Right then it apply corresponding function
public either ( callable $left, callable $right ) : mixed
$left callable (a -> b)
$right callable (c -> b)
return mixed b