Module Monad.Make2

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

Parameters

module X : Basic2

Signature

val (>>=) : ('a, 'e) X.t -> ('a -> ('b, 'e) X.t) -> ('b, 'e) X.t
val (>>|) : ('a, 'e) X.t -> ('a -> 'b) -> ('b, 'e) X.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) X.t -> f:('a -> ('b, 'e) X.t) -> ('b, 'e) X.t
val return : 'a -> ('a, _) X.t
val map : ('a, 'e) X.t -> f:('a -> 'b) -> ('b, 'e) X.t
val join : (('a, 'e) X.t, 'e) X.t -> ('a, 'e) X.t
val ignore_m : (_, 'e) X.t -> (unit, 'e) X.t
val all : ('a, 'e) X.t list -> ('a list, 'e) X.t
val all_unit : (unit, 'e) X.t list -> (unit, 'e) X.t