Module Function


module Function: sig .. end
Common functions and combinators.

val identity : 'a -> 'a
The identity function.
val constant : 'a -> 'b -> 'a
Constant function.
val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
Function composition.
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
Flips the order of the first two argument.
val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
Curries a function.
val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
Uncurry a function.
val until : ('a -> bool) -> ('a -> 'a) -> 'a -> 'a
until p f x applies f repeatedly, starting with x, until the predicate p evaluates to true.

Note: If p x is true then x is returned.

val fix : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b
Computes the fix-point for the function transformer.

Hosted by the SourceForge.net Logo* web site.
*Other names and brands may be claimed as the property of others.