Monad.S2Complete monad interface with two type parameters.
val return : 'a 'i 'p 'q. 'a -> ('a, 'p) 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 ~f is equivalent to bind t ~f:(fun x -> return (f x))return x >>= f is equivalent to f xt >>= return is equivalent to t(t >>= f) >>= g is equivalent to t >>= fun x -> f x >>= gCombines 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.
module Monad_infix : sig ... endmodule Let_syntax : sig ... end