Make.Fn
Various function combinators lifted into the Kleisli category.
val id : 'a -> 'a T1(M).t
id x a monadic identity function
id x
val ignore : 'a T1(M).t -> unit T1(M).t
ignore m computes m and discards the result.
ignore m
m
val nothing : unit -> unit T1(M).t
nothing is a computation that does nothing.
nothing
val non : ('a -> bool T1(M).t) -> 'a -> bool T1(M).t
non f returns a negation of the function f.
non f
f
val apply_n_times : n:int -> ('a -> 'a T1(M).t) -> 'a -> 'a T1(M).t
apply_n_times ~n f creates a chaing of computation of size n made from applications of the same function to its own result.
apply_n_times ~n f
n
val compose : ('b -> 'c T1(M).t) -> ('a -> 'b T1(M).t) -> 'a -> 'c T1(M).t
compose f g creates a composition f.g of two function.
compose f g
f.g