wax-lib.utils
Wax_utils.Uint32
32-bit unsigned integers.
wax-lib
wax-lib.conversion
wax-lib.theo
wax-lib.wasm
wax-lib.wax
type t
The type of 32-bit unsigned integers.
val of_string : string -> t
of_string s parses a 32-bit unsigned integer from its decimal representation.
of_string s
val to_string : t -> string
to_string n returns the decimal representation of n.
to_string n
n
val of_int : int -> t
of_int n converts an OCaml int to a 32-bit unsigned integer.
of_int n
int
val to_int : t -> int
Convert to an OCaml int. May raise if the value doesn't fit.
val zero : t
The value 0.
val one : t
The value 1.
val succ : t -> t
succ n returns n + 1.
succ n
n + 1
val add : t -> t -> t
add n1 n2 returns n1 + n2 modulo 2^32.
add n1 n2
n1 + n2
val compare : t -> t -> int
compare n1 n2 compares n1 and n2.
compare n1 n2
n1
n2