Module Femtolib.Pervasives


module Pervasives: sig .. end

exception Found
val (|>) : 'a -> ('a -> 'b) -> 'b
A kind of reverse polish notation. Or it can be seen as a (shell) pipe / redirection. It's just syntactic sugar, allowing to write the argument before the function. Allows one to write for instance

[|0;1;2;3|] |> Array.to_list |> List.filter (fun x -> x mod 3 = 0) |> Array.of_list

val identity : 'a -> 'a
val int_of_bool : bool -> int
int_of_bool false is 0 and int_of_bool true is 1.
val bool_of_int : int -> bool
val extract_bit : int -> int -> bool
extract_bit nth i is true iff the nth bit of i is 1
val power_of_2 : int -> bool
val (+=) : int Pervasives.ref -> int -> unit

type comparison =
| Lt (*Lower Than*)
| Gt (*Greater Than*)
| Eq (*Equal*)