Monad.WITH_RETURN_AND_BIND
Minimal definition using return and bind.
return
bind
type 'a t
The type held by the Monad.
Monad
include Indexed_monad.WITH_RETURN with type ('a, 'index) t := 'a t
val return : 'a -> 'a t
Lift a value into a t.
t
include Indexed_bind.WITH_BIND with type ('a, 'index) t := 'a t
val bind : ('a -> 'b t) -> 'a t -> 'b t
bind f m passes the result of computation m to function f.
bind f m
m
f