PHP Class Widmogrod\Helpful\MonadLaws

ファイルを表示 Open project: widmogrod/php-functional Class Usage Examples

Public Methods

Method Description
test ( callable $assertEqual, callable $return, callable $f, callable $g, mixed $x ) Generic test to verify if a type obey the monad laws.

Method Details

test() public static method

Generic test to verify if a type obey the monad laws.
public static test ( callable $assertEqual, callable $return, callable $f, callable $g, mixed $x )
$assertEqual callable Asserting function (Monad $m1, Monad $m2, $message)
$return callable Monad "constructor"
$f callable Monadic function
$g callable Monadic function
$x mixed Value to put into a monad