associativity :: (Monad m, Monad f, Show a, Show b, Show c, Show (f a), Show (f b), Show (f c), Eq (f a), Eq (f c), Serial Identity a, Serial Identity b, Serial Identity c) => Series m (f a) -> Series m (a -> f b) -> Series m (b -> f c) -> Property m Source
Check the associativity law hold for the given Monad
Series
:
(m >>=
f) >>=
g ≡ m (f >=>
g)
This is equivalent to:
(f >=>
g) >=>
h == f >=>
(g >=>
h)
Assuming join
is the default implementation of Monad
.