CCInt.neg

This commit is contained in:
Simon Cruanes 2014-10-28 16:38:56 +01:00
parent 56132eacad
commit 1374a2741c
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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