PHP Class Widmogrod\Helpful\FunctorLaws

Show file Open project: widmogrod/php-functional Class Usage Examples

Public Methods

Method Description
test ( callable $assertEqual, callable $f, callable $g, Widmogrod\FantasyLand\Functor $x ) Generic test to verify if a type obey the functor laws.

Method Details

test() public static method

Generic test to verify if a type obey the functor laws.
public static test ( callable $assertEqual, callable $f, callable $g, Widmogrod\FantasyLand\Functor $x )
$assertEqual callable Asserting function (Functor $f1, Functor $f2, $message)
$f callable (a -> b)
$g callable (a -> b)
$x Widmogrod\FantasyLand\Functor f a