module Utils:sig
..end
type
os_type =
| |
Win32 |
| |
Unix |
| |
Cygwin |
exception Error of string
val get_os_type : os_type
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
val comp : 'a cfun
val compare_2_tup : 'a cfun * 'b cfun -> 'a * 'b -> 'a * 'b -> int
val compare_3_tup : 'a cfun * 'b cfun * 'c cfun ->
'a * 'b * 'c -> 'a * 'b * 'c -> int
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.