Module CCInt
Basic Int functions
val compare : t -> t -> intThe comparison function for integers with the same specification as
Pervasives.compare.
val pow : t -> t -> tpow base exponentreturnsbaseraised to the power ofexponent.pow a b = a^bfor positive integersaandb. RaisesInvalid_argumentifa = b = 0orb< 0.- since
- 0.11
val floor_div : t -> t -> tfloor_div a nis integer division rounding towards negative infinity. It satisfiesa = m * floor_div a n + rem a n.- since
- 1.2
type 'a printer= Format.formatter -> 'a -> unittype 'a random_gen= Random.State.t -> 'atype 'a sequence= ('a -> unit) -> unit
val random : int -> t random_genval random_small : t random_genval random_range : int -> int -> t random_genval pp : t printerval to_string : t -> stringReturn the string representation of its argument, in signed decimal.
- since
- 0.13
val of_string : string -> t option- since
- 0.13
val to_string_binary : t -> string- since
- 0.20
val range_by : step:t -> t -> t -> t sequencerange_by ~step i jiterates on integers fromitojincluded, where the difference between successive elements isstep. Use a negativestepfor a decreasing list.- raises Invalid_argument
if
step=0.
- since
- 1.2
val range : t -> t -> t sequencerange i jiterates on integers fromitojincluded . It works both for decreasing and increasing ranges.- since
- 1.2
val range' : t -> t -> t sequenceLike
rangebut the second bound is excluded. For instancerange' 0 5 = Iter.of_list [0;1;2;3;4].- since
- 1.2
Infix Operators
- since
- 0.17
module Infix : sig ... end