Monad.Make
Functor building the aliases for a minimal implementation for MONAD
.
module Monad : sig ... end
type 'a t = 'a Monad.t
The type of actions in the monad.
val return : 'a -> 'a t
return a
injects a
into the monadic type.
bind f a
is the sequential composition of two actions, passing any value produced by a
as argument to f
.
compose g f
is the Kleisli composition of f
and g
, passing the input to f
, then binding the output to g
.
( let* ) ma f
is bind f ma
. This is a binding operator, and it is used as let* a = ma in f a
.