Applicative.Make2SourceProduces a monad with two type parameters.
module X : sig ... endinclude S2 with type ('a, 'p) t := ('a, 'p) X.tval return : 'a 'p 'q. 'a -> ('a, 'p) X.tConvert a value to a t.
Applies the functions in one t to the values in another. Well-behaved applicatives satisfy these "laws", using <*> as infix apply:
return Fn.id <*> t is equivalent to treturn Fn.compose <*> tf <*> tg <*> tx is equivalent to tf <*> (tg <*> tx)return f <*> return x is equivalent to return (f x)tf <*> return x is equivalent to return (fun f -> f x) <*> tfCombines values in two ts as tuples. Using <*> as infix apply, equivalent to return (fun a b -> a, b) <*> ta <*> tb.
Transforms the contents of a t. Using <*> as infix apply, equivalent to return f <*> t.
Combines the contents of two ts. Using <*> as infix apply, equivalent to return f <*> ta <*> tb.
val map3 :
'a 'b 'c 'd 'p 'q. ('a, 'p) X.t ->
('b, 'p) X.t ->
('c, 'p) X.t ->
f:('a -> 'b -> 'c -> 'd) ->
('d, 'p) X.tCombines the contents of three ts. Using <*> as infix apply, equivalent to return f <*> ta <*> tb <*> tc.
Combines a list of t whose contents are unimportant.