mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
CCInt.neg
This commit is contained in:
parent
56132eacad
commit
1374a2741c
2 changed files with 6 additions and 0 deletions
|
|
@ -37,6 +37,8 @@ let sign i =
|
||||||
else if i>0 then 1
|
else if i>0 then 1
|
||||||
else 0
|
else 0
|
||||||
|
|
||||||
|
let neg i = -i
|
||||||
|
|
||||||
type 'a printer = Buffer.t -> 'a -> unit
|
type 'a printer = Buffer.t -> 'a -> unit
|
||||||
type 'a formatter = Format.formatter -> 'a -> unit
|
type 'a formatter = Format.formatter -> 'a -> unit
|
||||||
type 'a random_gen = Random.State.t -> 'a
|
type 'a random_gen = Random.State.t -> 'a
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ val hash : t -> int
|
||||||
val sign : t -> int
|
val sign : t -> int
|
||||||
(** [sign i] is one of [-1, 0, 1] *)
|
(** [sign i] is one of [-1, 0, 1] *)
|
||||||
|
|
||||||
|
val neg : t -> t
|
||||||
|
(** [neg i = - i]
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
type 'a printer = Buffer.t -> 'a -> unit
|
type 'a printer = Buffer.t -> 'a -> unit
|
||||||
type 'a formatter = Format.formatter -> 'a -> unit
|
type 'a formatter = Format.formatter -> 'a -> unit
|
||||||
type 'a random_gen = Random.State.t -> 'a
|
type 'a random_gen = Random.State.t -> 'a
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue