Make.Lift
Lifts functions into the monad.
A function that operates on values can be mapped to a function that operates on computations. We provide several liftes for common arities.
val nullary : 'a -> 'a T(M).t
nullary x lifts x (a synonym to return)
nullary x
x
return
val unary : ('a -> 'b) -> 'a T(M).t -> 'b T(M).t
unary f lifts f
unary f
f
val binary : ('a -> 'b -> 'c) -> 'a T(M).t -> 'b T(M).t -> 'c T(M).t
binary f lifts f
binary f
val ternary : ('a -> 'b -> 'c -> 'd) -> 'a T(M).t -> 'b T(M).t -> 'c T(M).t -> 'd T(M).t
ternary f lifts f
ternary f
val quaternary : ('a -> 'b -> 'c -> 'd -> 'e) -> 'a T(M).t -> 'b T(M).t -> 'c T(M).t -> 'd T(M).t -> 'e T(M).t
quaternary f lifts f
quaternary f
val quinary : ('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'a T(M).t -> 'b T(M).t -> 'c T(M).t -> 'd T(M).t -> 'e T(M).t -> 'f T(M).t
quinary f lifts f
quinary f