Monad.Def
A definition of monads, each of the combinators is used in the Make
functor.
val return : 'a -> 'a t
The monadic laws must hold:
(x>>=f)>>=g
= x>>=fun x' -> (f x'>>=g)
return a >>= f
= f a
x>>=return
= x
As well as the following identities:
x >> y
= x >>= fun () -> y
map f x
= x >>= fun x' -> f x'