Module Monad.Of_monad2

The same as S except the monad type has two arguments. The second is always just passed through.

Parameters

module Monad : S2
module M : sig ... end

Signature

val (>>=) : ('a, 'e) M.t -> ('a -> ('b, 'e) M.t) -> ('b, 'e) M.t
val (>>|) : ('a, 'e) M.t -> ('a -> 'b) -> ('b, 'e) M.t
module Let_syntax : sig ... end
module Monad_infix : sig ... end

Same as Infix, except the monad type has two arguments. The second is always just passed through.

val bind : ('a, 'e) M.t -> f:('a -> ('b, 'e) M.t) -> ('b, 'e) M.t
val return : 'a -> ('a, _) M.t
val map : ('a, 'e) M.t -> f:('a -> 'b) -> ('b, 'e) M.t
val join : (('a, 'e) M.t, 'e) M.t -> ('a, 'e) M.t
val ignore_m : (_, 'e) M.t -> (unit, 'e) M.t
val all : ('a, 'e) M.t list -> ('a list, 'e) M.t
val all_unit : (unit, 'e) M.t list -> (unit, 'e) M.t