Module ExtUtils.Utils


module Utils: sig .. end


type os_type =
| Win32
| Unix
| Cygwin
Type of the two supported operation systems.
exception Error of string
Error type
val get_os_type : os_type
returns the operation system
val replicate : int -> 'a -> 'a list
replicate x a returns a;a;...;a, where the length of the list is x.
val apply : ('a -> 'b) -> 'a -> 'b
apply f x runs the function f and gives x as parameter.
val apply' : 'a -> ('a -> 'b) -> 'b
apply' x f runs the function f and gives x as parameter.
type 'a cfun = 'a -> 'a -> int 
type of a total ordering function
val comp : 'a cfun
compares two values
val compare_2_tup : 'a cfun * 'b cfun -> 'a * 'b -> 'a * 'b -> int
Returns a total ordering of tuppels with two components
val compare_3_tup : 'a cfun * 'b cfun * 'c cfun ->
'a * 'b * 'c -> 'a * 'b * 'c -> int
Returns a total ordering of tuppels with three components
val fixpoint : ('a -> 'a) -> 'a -> 'a
fixpoint f a applies f to a, then f to f a, and so on, until a fixpoint is reached and f x == x for some x = f ... f a.

Waring: This could yield to an infinite loop. A possibility to ensure termination of this fixpoint computation is to use only monotone functions f satisfying the ascending chain condition.

val compare_to_equal : ('a -> 'a -> int) -> 'a -> 'a -> bool
compare_to_equal f returns a function that returns true of f a b == 0, otherwise it returns false.
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
flip f turns the order of parameters of f, if f is a function with two parameters.