Module Monad.Of_monad_indexed
Converts between monadic types with index type parameters.
Parameters
module Monad : sig ... endmodule M : sig ... endSignature
include Base.Monad.S_indexed with type ('a, 'i, 'j) t := ('a, 'i, 'j) M.t
val return : 'a 'i 'p 'q. 'a -> ('a, 'i, 'i) M.tConvert a value to a t.
Transforms the contents of a t.
Sequences computations. bind t ~f computes f v for value(s) v in t. Well-behaved monads satisfy these "laws" (where ( >>= ) is the infix bind operator):
map t ~fis equivalent tobind t ~f:(fun x -> return (f x))return x >>= fis equivalent tof xt >>= returnis equivalent tot(t >>= f) >>= gis equivalent tot >>= fun x -> f x >>= g
Combines nested t into just one layer. Equivalent to bind t ~f:Fn.id.
Ignores contained values of t. Equivalent to map t ~f:ignore.
Combines a list of t whose contents are unimportant.
Infix bind.
module Monad_infix : sig ... endmodule Let_syntax : sig ... end