Monad.S_with_product
In a computational point of view, a monad is an abstraction of a sequence of operations. But sometimes, one may need to specify that two operations can be performed in *any* order, for instance when dealing with concurrency or generic errors handling using the option
type. To do so, one needs a *product* on monadic values, i.e a way to combine two monads into a new one. Thus a second signature is provided, including a product operator and the two let-bindings and*
and and+
.
val return : 'a -> 'a t
module Bool : sig ... end
module Option : sig ... end
module List : sig ... end
module Operators : sig ... end