mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
prepare for 3.0~rc1
This commit is contained in:
parent
2eb58dd6c4
commit
add6a58cf5
30 changed files with 200 additions and 200 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "2.8.1"
|
version: "3.0~rc1"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
synopsis: "A set of advanced datatypes for containers"
|
synopsis: "A set of advanced datatypes for containers"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "2.8.1"
|
version: "3.0~rc1"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
synopsis: "An extension of containers for threading"
|
synopsis: "An extension of containers for threading"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
name: "containers"
|
name: "containers"
|
||||||
version: "2.8.1"
|
version: "3.0~rc1"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
synopsis: "A modular, clean and powerful extension of the OCaml standard library"
|
synopsis: "A modular, clean and powerful extension of the OCaml standard library"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
|
||||||
|
|
||||||
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
||||||
(** [mem ~eq x a] return true if x is present in [a]. Linear time.
|
(** [mem ~eq x a] return true if x is present in [a]. Linear time.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val find_map : ('a -> 'b option) -> 'a t -> 'b option
|
val find_map : ('a -> 'b option) -> 'a t -> 'b option
|
||||||
|
|
@ -193,8 +193,8 @@ val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
||||||
The input array [a] is shared with the sequence and modification of it will result
|
The input array [a] is shared with the sequence and modification of it will result
|
||||||
in modification of the sequence.
|
in modification of the sequence.
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ val sort_ranking : f:('a -> 'a -> int) -> 'a t -> int array
|
||||||
|
|
||||||
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
||||||
(** [mem ~eq x a] return true if x is present in [a]. Linear time.
|
(** [mem ~eq x a] return true if x is present in [a]. Linear time.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val find_map : f:('a -> 'b option) -> 'a t -> 'b option
|
val find_map : f:('a -> 'b option) -> 'a t -> 'b option
|
||||||
|
|
@ -199,8 +199,8 @@ val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_seq a] returns a [Seq.t] of the elements of an array [a].
|
||||||
The input array [a] is shared with the sequence and modification of it will result
|
The input array [a] is shared with the sequence and modification of it will result
|
||||||
in modification of the sequence.
|
in modification of the sequence.
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ val map : ('a -> 'b) -> 'b t -> 'a t
|
||||||
|
|
||||||
val always_eq : _ t
|
val always_eq : _ t
|
||||||
(** Always returns true. All values are equal.
|
(** Always returns true. All values are equal.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val never_eq : _ t
|
val never_eq : _ t
|
||||||
(** Always returns false. No values are, so this
|
(** Always returns false. No values are, so this
|
||||||
is not even reflexive (i.e. [x=x] is false).
|
is not even reflexive (i.e. [x=x] is false).
|
||||||
Be careful!
|
Be careful!
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val (>|=) : 'b t -> ('a -> 'b) -> 'a t
|
val (>|=) : 'b t -> ('a -> 'b) -> 'a t
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ val epsilon : t
|
||||||
|
|
||||||
val pi : t
|
val pi : t
|
||||||
(** [pi] is the constant pi. The ratio of a circumference to its diameter.
|
(** [pi] is the constant pi. The ratio of a circumference to its diameter.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val is_nan : t -> bool
|
val is_nan : t -> bool
|
||||||
(** [is_nan f] returns [true] if f is NaN, [false] otherwise. *)
|
(** [is_nan f] returns [true] if f is NaN, [false] otherwise. *)
|
||||||
|
|
@ -108,7 +108,7 @@ val of_string_exn : string -> t
|
||||||
@since 1.2 *)
|
@since 1.2 *)
|
||||||
|
|
||||||
val of_string_opt : string -> t option
|
val of_string_opt : string -> t option
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val equal_precision : epsilon:t -> t -> t -> bool
|
val equal_precision : epsilon:t -> t -> t -> bool
|
||||||
(** Equality with allowed error up to a non negative epsilon value. *)
|
(** Equality with allowed error up to a non negative epsilon value. *)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ val float : float printer
|
||||||
|
|
||||||
val exn : exn printer
|
val exn : exn printer
|
||||||
(** Printer using {!Printexc.to_string}.
|
(** Printer using {!Printexc.to_string}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val newline : unit printer
|
val newline : unit printer
|
||||||
(** Force newline (see {!Format.pp_force_newline}).
|
(** Force newline (see {!Format.pp_force_newline}).
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ module Poly : sig
|
||||||
|
|
||||||
val add_seq : ('a,'b) Hashtbl.t -> ('a * 'b) Seq.t -> unit
|
val add_seq : ('a,'b) Hashtbl.t -> ('a * 'b) Seq.t -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
Renamed from [add_std_seq] since NEXT_RELEASE.
|
Renamed from [add_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : ('a * 'b) iter -> ('a,'b) Hashtbl.t
|
val of_iter : ('a * 'b) iter -> ('a,'b) Hashtbl.t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
|
|
@ -83,8 +83,8 @@ module Poly : sig
|
||||||
|
|
||||||
val of_seq : ('a * 'b) Seq.t -> ('a,'b) Hashtbl.t
|
val of_seq : ('a * 'b) Seq.t -> ('a,'b) Hashtbl.t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_iter_count : ('a, int) Hashtbl.t -> 'a iter -> unit
|
val add_iter_count : ('a, int) Hashtbl.t -> 'a iter -> unit
|
||||||
(** [add_iter_count tbl i] increments the count of each element of [i]
|
(** [add_iter_count tbl i] increments the count of each element of [i]
|
||||||
|
|
@ -96,8 +96,8 @@ module Poly : sig
|
||||||
(** [add_seq_count tbl seq] increments the count of each element of [seq]
|
(** [add_seq_count tbl seq] increments the count of each element of [seq]
|
||||||
by calling {!incr}. This is useful for counting how many times each
|
by calling {!incr}. This is useful for counting how many times each
|
||||||
element of [seq] occurs.
|
element of [seq] occurs.
|
||||||
Renamed from [add_std_seq_count] since NEXT_RELEASE.
|
Renamed from [add_std_seq_count] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter_count : 'a iter -> ('a, int) Hashtbl.t
|
val of_iter_count : 'a iter -> ('a, int) Hashtbl.t
|
||||||
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
||||||
|
|
@ -105,8 +105,8 @@ module Poly : sig
|
||||||
|
|
||||||
val of_seq_count : 'a Seq.t -> ('a, int) Hashtbl.t
|
val of_seq_count : 'a Seq.t -> ('a, int) Hashtbl.t
|
||||||
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
||||||
Renamed from [of_std_seq_count] since NEXT_RELEASE.
|
Renamed from [of_std_seq_count] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_list : ('a,'b) Hashtbl.t -> ('a * 'b) list
|
val to_list : ('a,'b) Hashtbl.t -> ('a * 'b) list
|
||||||
(** [to_list tbl] returns the list of (key,value) bindings (order unspecified). *)
|
(** [to_list tbl] returns the list of (key,value) bindings (order unspecified). *)
|
||||||
|
|
@ -207,8 +207,8 @@ module type S = sig
|
||||||
|
|
||||||
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
|
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
Renamed from [add_std_seq] since NEXT_RELEASE.
|
Renamed from [add_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : (key * 'a) iter -> 'a t
|
val of_iter : (key * 'a) iter -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
|
|
@ -216,8 +216,8 @@ module type S = sig
|
||||||
|
|
||||||
val of_seq : (key * 'a) Seq.t -> 'a t
|
val of_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_iter_count : int t -> key iter -> unit
|
val add_iter_count : int t -> key iter -> unit
|
||||||
(** [add_iter_count tbl i] increments the count of each element of [i]
|
(** [add_iter_count tbl i] increments the count of each element of [i]
|
||||||
|
|
@ -229,8 +229,8 @@ module type S = sig
|
||||||
(** [add_seq_count tbl seq] increments the count of each element of [seq]
|
(** [add_seq_count tbl seq] increments the count of each element of [seq]
|
||||||
by calling {!incr}. This is useful for counting how many times each
|
by calling {!incr}. This is useful for counting how many times each
|
||||||
element of [seq] occurs.
|
element of [seq] occurs.
|
||||||
Renamed from [of_std_seq_count] since NEXT_RELEASE.
|
Renamed from [of_std_seq_count] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter_count : key iter -> int t
|
val of_iter_count : key iter -> int t
|
||||||
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
||||||
|
|
@ -238,8 +238,8 @@ module type S = sig
|
||||||
|
|
||||||
val of_seq_count : key Seq.t -> int t
|
val of_seq_count : key Seq.t -> int t
|
||||||
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
(** Like {!add_seq_count}, but allocates a new table and returns it.
|
||||||
Renamed from [of_std_seq_count] since NEXT_RELEASE.
|
Renamed from [of_std_seq_count] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_list : 'a t -> (key * 'a) list
|
val to_list : 'a t -> (key * 'a) list
|
||||||
(** [to_list tbl] returns the list of (key,value) bindings (order unspecified). *)
|
(** [to_list tbl] returns the list of (key,value) bindings (order unspecified). *)
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,8 @@ module type S = sig
|
||||||
|
|
||||||
val add_seq : t -> elt Seq.t -> t
|
val add_seq : t -> elt Seq.t -> t
|
||||||
(** [add_seq h seq] is like {!add_list}.
|
(** [add_seq h seq] is like {!add_list}.
|
||||||
Renamed from [add_std_seq] since NEXT_RELEASE.
|
Renamed from [add_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : elt iter -> t
|
val of_iter : elt iter -> t
|
||||||
(** [of_iter iter] builds a heap from a given [iter]. Complexity: [O(n log n)].
|
(** [of_iter iter] builds a heap from a given [iter]. Complexity: [O(n log n)].
|
||||||
|
|
@ -122,8 +122,8 @@ module type S = sig
|
||||||
|
|
||||||
val of_seq : elt Seq.t -> t
|
val of_seq : elt Seq.t -> t
|
||||||
(** [of_seq seq] builds a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
(** [of_seq seq] builds a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
||||||
Renamed from [of_seq] since NEXT_RELEASE.
|
Renamed from [of_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_iter : t -> elt iter
|
val to_iter : t -> elt iter
|
||||||
(** [to_iter h] returns a [iter] of the elements of the heap [h].
|
(** [to_iter h] returns a [iter] of the elements of the heap [h].
|
||||||
|
|
@ -131,8 +131,8 @@ module type S = sig
|
||||||
|
|
||||||
val to_seq : t -> elt Seq.t
|
val to_seq : t -> elt Seq.t
|
||||||
(** [to_seq h] returns a [Seq.t] of the elements of the heap [h].
|
(** [to_seq h] returns a [Seq.t] of the elements of the heap [h].
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_iter_sorted : t -> elt iter
|
val to_iter_sorted : t -> elt iter
|
||||||
(** [to_iter_sorted h] returns a [iter] by iterating on the elements of [h],
|
(** [to_iter_sorted h] returns a [iter] by iterating on the elements of [h],
|
||||||
|
|
@ -142,8 +142,8 @@ module type S = sig
|
||||||
val to_seq_sorted : t -> elt Seq.t
|
val to_seq_sorted : t -> elt Seq.t
|
||||||
(** [to_seq_sorted h] returns a [Seq.t] by iterating on the elements of [h],
|
(** [to_seq_sorted h] returns a [Seq.t] by iterating on the elements of [h],
|
||||||
in increasing order.
|
in increasing order.
|
||||||
Renamed from [to_std_seq_sorted] since NEXT_RELEASE.
|
Renamed from [to_std_seq_sorted] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_gen : t -> elt gen -> t
|
val add_gen : t -> elt gen -> t
|
||||||
(** [add_gen h gen] adds the gen [gen] to the heap [h].
|
(** [add_gen h gen] adds the gen [gen] to the heap [h].
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ val with_in_out : ?mode:int -> ?flags:open_flag list ->
|
||||||
val copy_into : ?bufsize:int -> in_channel -> out_channel -> unit
|
val copy_into : ?bufsize:int -> in_channel -> out_channel -> unit
|
||||||
(** [copy_into ic oc] writes the content of [ic] into [oc].
|
(** [copy_into ic oc] writes the content of [ic] into [oc].
|
||||||
It is a blocking call.
|
It is a blocking call.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
(** {2 Misc for Generators} *)
|
(** {2 Misc for Generators} *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,52 +9,52 @@ type t = int
|
||||||
|
|
||||||
val zero : t
|
val zero : t
|
||||||
(** [zero] is the integer [0].
|
(** [zero] is the integer [0].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val one : t
|
val one : t
|
||||||
(** [one] is the integer [1].
|
(** [one] is the integer [1].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val minus_one : t
|
val minus_one : t
|
||||||
(** [minus_one] is the integer [-1].
|
(** [minus_one] is the integer [-1].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add : t -> t -> t
|
val add : t -> t -> t
|
||||||
(** [add x y] is [x + y].
|
(** [add x y] is [x + y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val sub : t -> t -> t
|
val sub : t -> t -> t
|
||||||
(** [sub x y] is [x - y].
|
(** [sub x y] is [x - y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val mul : t -> t -> t
|
val mul : t -> t -> t
|
||||||
(** [mul x y] is [x * y].
|
(** [mul x y] is [x * y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val div : t -> t -> t
|
val div : t -> t -> t
|
||||||
(** [div x y] is [x / y]
|
(** [div x y] is [x / y]
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val succ : t -> t
|
val succ : t -> t
|
||||||
(** [succ x] is [x + 1].
|
(** [succ x] is [x + 1].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val pred : t -> t
|
val pred : t -> t
|
||||||
(** [pred x] is [x - 1].
|
(** [pred x] is [x - 1].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val abs : t -> t
|
val abs : t -> t
|
||||||
(** [abs x] is the absolute value of [x]. It is [x] if [x] is positive
|
(** [abs x] is the absolute value of [x]. It is [x] if [x] is positive
|
||||||
and [neg x] otherwise.
|
and [neg x] otherwise.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val max_int : t
|
val max_int : t
|
||||||
(** [max_int] is the maximum integer.
|
(** [max_int] is the maximum integer.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val min_int : t
|
val min_int : t
|
||||||
(** [min_int] is the minimum integer.
|
(** [min_int] is the minimum integer.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val compare : t -> t -> int
|
val compare : t -> t -> int
|
||||||
(** [compare x y] is the comparison function for integers
|
(** [compare x y] is the comparison function for integers
|
||||||
|
|
@ -105,11 +105,11 @@ val pp : t printer
|
||||||
|
|
||||||
val to_float : t -> float
|
val to_float : t -> float
|
||||||
(** [to_float] is the same as [float_of_int]
|
(** [to_float] is the same as [float_of_int]
|
||||||
@since NEXT_RELEASE*)
|
@since 3.0*)
|
||||||
|
|
||||||
val of_float : float -> t
|
val of_float : float -> t
|
||||||
(** [to_float] is the same as [int_of_float]
|
(** [to_float] is the same as [int_of_float]
|
||||||
@since NEXT_RELEASE*)
|
@since 3.0*)
|
||||||
|
|
||||||
val to_string : t -> string
|
val to_string : t -> string
|
||||||
(** [to_string x] returns the string representation of the integer [x], in signed decimal.
|
(** [to_string x] returns the string representation of the integer [x], in signed decimal.
|
||||||
|
|
@ -124,12 +124,12 @@ val of_string_exn : string -> t
|
||||||
(** [of_string_exn s] converts the given string [s] to an integer.
|
(** [of_string_exn s] converts the given string [s] to an integer.
|
||||||
Alias to {!int_of_string}.
|
Alias to {!int_of_string}.
|
||||||
@raise Failure in case of failure.
|
@raise Failure in case of failure.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_float : float -> t
|
val of_float : float -> t
|
||||||
(** [of_float x] converts the given floating-point number [x] to an integer.
|
(** [of_float x] converts the given floating-point number [x] to an integer.
|
||||||
Alias to {!int_of_float}.
|
Alias to {!int_of_float}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val pp_binary : t printer
|
val pp_binary : t printer
|
||||||
(** [pp_binary ppf x] prints [x] on [ppf].
|
(** [pp_binary ppf x] prints [x] on [ppf].
|
||||||
|
|
@ -167,35 +167,35 @@ val range' : t -> t -> t iter
|
||||||
|
|
||||||
val popcount : t -> int
|
val popcount : t -> int
|
||||||
(** Number of bits set to 1
|
(** Number of bits set to 1
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val logand : t -> t -> t
|
val logand : t -> t -> t
|
||||||
(** [logand] is the same as [(land)].
|
(** [logand] is the same as [(land)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val logor : t -> t -> t
|
val logor : t -> t -> t
|
||||||
(** [logand] is the same as [(lor)].
|
(** [logand] is the same as [(lor)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val logxor : t -> t -> t
|
val logxor : t -> t -> t
|
||||||
(** [logxor] is the same as [(lxor)].
|
(** [logxor] is the same as [(lxor)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val lognot : t -> t
|
val lognot : t -> t
|
||||||
(** [logand] is the same as [lnot].
|
(** [logand] is the same as [lnot].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val shift_left : t -> int -> t
|
val shift_left : t -> int -> t
|
||||||
(** [shift_left] is the same as [(lsl)].
|
(** [shift_left] is the same as [(lsl)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val shift_right : t -> int -> t
|
val shift_right : t -> int -> t
|
||||||
(** [shift_right] is the same as [(asr)].
|
(** [shift_right] is the same as [(asr)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val shift_right_logical : t -> int -> t
|
val shift_right_logical : t -> int -> t
|
||||||
(** [shift_right_logical] is the same as [(lsr)].
|
(** [shift_right_logical] is the same as [(lsr)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
(** {2 Infix Operators}
|
(** {2 Infix Operators}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,11 @@ include module type of struct include Int32 end
|
||||||
|
|
||||||
val min : t -> t -> t
|
val min : t -> t -> t
|
||||||
(** [min x y] returns the minimum of the two integers [x] and [y].
|
(** [min x y] returns the minimum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val max : t -> t -> t
|
val max : t -> t -> t
|
||||||
(** [max x y] returns the maximum of the two integers [x] and [y].
|
(** [max x y] returns the maximum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val hash : t -> int
|
val hash : t -> int
|
||||||
(** [hash x] computes the hash of [x].
|
(** [hash x] computes the hash of [x].
|
||||||
|
|
@ -33,7 +33,7 @@ val hash : t -> int
|
||||||
val sign : t -> int
|
val sign : t -> int
|
||||||
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
||||||
Same as [compare x zero].
|
Same as [compare x zero].
|
||||||
@since NEXT_RELEASE*)
|
@since 3.0*)
|
||||||
|
|
||||||
val pow : t -> t -> t
|
val pow : t -> t -> t
|
||||||
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
||||||
|
|
@ -44,7 +44,7 @@ val pow : t -> t -> t
|
||||||
val floor_div : t -> t -> t
|
val floor_div : t -> t -> t
|
||||||
(** [floor_div x n] is integer division rounding towards negative infinity.
|
(** [floor_div x n] is integer division rounding towards negative infinity.
|
||||||
It satisfies [x = m * floor_div x n + rem x n].
|
It satisfies [x = m * floor_div x n + rem x n].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
type 'a random_gen = Random.State.t -> 'a
|
type 'a random_gen = Random.State.t -> 'a
|
||||||
|
|
@ -56,17 +56,17 @@ val range_by : step:t -> t -> t -> t iter
|
||||||
where the difference between successive elements is [step].
|
where the difference between successive elements is [step].
|
||||||
Use a negative [step] for a decreasing list.
|
Use a negative [step] for a decreasing list.
|
||||||
@raise Invalid_argument if [step=0].
|
@raise Invalid_argument if [step=0].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range : t -> t -> t iter
|
val range : t -> t -> t iter
|
||||||
(** [range i j] iterates on integers from [i] to [j] included . It works
|
(** [range i j] iterates on integers from [i] to [j] included . It works
|
||||||
both for decreasing and increasing ranges.
|
both for decreasing and increasing ranges.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range' : t -> t -> t iter
|
val range' : t -> t -> t iter
|
||||||
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
||||||
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val random : t -> t random_gen
|
val random : t -> t random_gen
|
||||||
val random_small : t random_gen
|
val random_small : t random_gen
|
||||||
|
|
@ -102,19 +102,19 @@ val of_string_exn : string -> t
|
||||||
|
|
||||||
val to_string_binary : t -> string
|
val to_string_binary : t -> string
|
||||||
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Printing} *)
|
(** {2 Printing} *)
|
||||||
|
|
||||||
val pp : t printer
|
val pp : t printer
|
||||||
(** [pp ppf x] prints the integer [x] on [ppf].
|
(** [pp ppf x] prints the integer [x] on [ppf].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val pp_binary : t printer
|
val pp_binary : t printer
|
||||||
(** [pp_binary ppf x] prints [x] on [ppf].
|
(** [pp_binary ppf x] prints [x] on [ppf].
|
||||||
Print as "0b00101010".
|
Print as "0b00101010".
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Infix Operators} *)
|
(** {2 Infix Operators} *)
|
||||||
|
|
@ -151,15 +151,15 @@ module Infix : sig
|
||||||
|
|
||||||
val ( ** ) : t -> t -> t
|
val ( ** ) : t -> t -> t
|
||||||
(** Alias to {!pow}
|
(** Alias to {!pow}
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--) : t -> t -> t iter
|
val (--) : t -> t -> t iter
|
||||||
(** Alias to {!range}.
|
(** Alias to {!range}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--^) : t -> t -> t iter
|
val (--^) : t -> t -> t iter
|
||||||
(** Alias to {!range'}.
|
(** Alias to {!range'}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val ( land ) : t -> t -> t
|
val ( land ) : t -> t -> t
|
||||||
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,11 @@ include module type of struct include Int64 end
|
||||||
|
|
||||||
val min : t -> t -> t
|
val min : t -> t -> t
|
||||||
(** [min x y] returns the minimum of the two integers [x] and [y].
|
(** [min x y] returns the minimum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val max : t -> t -> t
|
val max : t -> t -> t
|
||||||
(** [max x y] returns the maximum of the two integers [x] and [y].
|
(** [max x y] returns the maximum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val hash : t -> int
|
val hash : t -> int
|
||||||
(** [hash x] computes the hash of [x].
|
(** [hash x] computes the hash of [x].
|
||||||
|
|
@ -33,7 +33,7 @@ val hash : t -> int
|
||||||
val sign : t -> int
|
val sign : t -> int
|
||||||
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
||||||
Same as [compare x zero].
|
Same as [compare x zero].
|
||||||
@since NEXT_RELEASE*)
|
@since 3.0*)
|
||||||
|
|
||||||
val pow : t -> t -> t
|
val pow : t -> t -> t
|
||||||
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
||||||
|
|
@ -44,7 +44,7 @@ val pow : t -> t -> t
|
||||||
val floor_div : t -> t -> t
|
val floor_div : t -> t -> t
|
||||||
(** [floor_div x n] is integer division rounding towards negative infinity.
|
(** [floor_div x n] is integer division rounding towards negative infinity.
|
||||||
It satisfies [x = m * floor_div x n + rem x n].
|
It satisfies [x = m * floor_div x n + rem x n].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
type 'a random_gen = Random.State.t -> 'a
|
type 'a random_gen = Random.State.t -> 'a
|
||||||
|
|
@ -56,17 +56,17 @@ val range_by : step:t -> t -> t -> t iter
|
||||||
where the difference between successive elements is [step].
|
where the difference between successive elements is [step].
|
||||||
Use a negative [step] for a decreasing list.
|
Use a negative [step] for a decreasing list.
|
||||||
@raise Invalid_argument if [step=0].
|
@raise Invalid_argument if [step=0].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range : t -> t -> t iter
|
val range : t -> t -> t iter
|
||||||
(** [range i j] iterates on integers from [i] to [j] included . It works
|
(** [range i j] iterates on integers from [i] to [j] included . It works
|
||||||
both for decreasing and increasing ranges.
|
both for decreasing and increasing ranges.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range' : t -> t -> t iter
|
val range' : t -> t -> t iter
|
||||||
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
||||||
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val random : t -> t random_gen
|
val random : t -> t random_gen
|
||||||
val random_small : t random_gen
|
val random_small : t random_gen
|
||||||
|
|
@ -103,19 +103,19 @@ val of_string_exn : string -> t
|
||||||
|
|
||||||
val to_string_binary : t -> string
|
val to_string_binary : t -> string
|
||||||
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Printing} *)
|
(** {2 Printing} *)
|
||||||
|
|
||||||
val pp : t printer
|
val pp : t printer
|
||||||
(** [pp ppf x] prints the integer [x] on [ppf].
|
(** [pp ppf x] prints the integer [x] on [ppf].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val pp_binary : t printer
|
val pp_binary : t printer
|
||||||
(** [pp_binary ppf x] prints [x] on [ppf].
|
(** [pp_binary ppf x] prints [x] on [ppf].
|
||||||
Print as "0b00101010".
|
Print as "0b00101010".
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Infix Operators} *)
|
(** {2 Infix Operators} *)
|
||||||
|
|
@ -154,15 +154,15 @@ module Infix : sig
|
||||||
|
|
||||||
val ( ** ) : t -> t -> t
|
val ( ** ) : t -> t -> t
|
||||||
(** Alias to {!pow}
|
(** Alias to {!pow}
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--) : t -> t -> t iter
|
val (--) : t -> t -> t iter
|
||||||
(** Alias to {!range}.
|
(** Alias to {!range}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--^) : t -> t -> t iter
|
val (--^) : t -> t -> t iter
|
||||||
(** Alias to {!range'}.
|
(** Alias to {!range'}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val ( land ) : t -> t -> t
|
val ( land ) : t -> t -> t
|
||||||
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
||||||
|
|
|
||||||
|
|
@ -755,8 +755,8 @@ val to_iter : 'a t -> 'a iter
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
|
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** [of_iter iter] builds a list from a given [iter].
|
(** [of_iter iter] builds a list from a given [iter].
|
||||||
|
|
@ -765,14 +765,14 @@ val of_iter : 'a iter -> 'a t
|
||||||
|
|
||||||
val of_seq_rev : 'a Seq.t -> 'a t
|
val of_seq_rev : 'a Seq.t -> 'a t
|
||||||
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
|
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
|
||||||
Renamed from [to_std_seq_rev] since NEXT_RELEASE.
|
Renamed from [to_std_seq_rev] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_seq : 'a Seq.t -> 'a t
|
val of_seq : 'a Seq.t -> 'a t
|
||||||
(** [of_seq seq] builds a list from a given [Seq.t].
|
(** [of_seq seq] builds a list from a given [Seq.t].
|
||||||
In the result, elements appear in the same order as they did in the source [Seq.t].
|
In the result, elements appear in the same order as they did in the source [Seq.t].
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)
|
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)
|
||||||
|
|
|
||||||
|
|
@ -759,8 +759,8 @@ val to_iter : 'a t -> 'a iter
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
|
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** [of_iter iter] builds a list from a given [iter].
|
(** [of_iter iter] builds a list from a given [iter].
|
||||||
|
|
@ -769,14 +769,14 @@ val of_iter : 'a iter -> 'a t
|
||||||
|
|
||||||
val of_seq_rev : 'a Seq.t -> 'a t
|
val of_seq_rev : 'a Seq.t -> 'a t
|
||||||
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
|
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
|
||||||
Renamed from [of_std_seq_rev] since NEXT_RELEASE.
|
Renamed from [of_std_seq_rev] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_seq : 'a Seq.t -> 'a t
|
val of_seq : 'a Seq.t -> 'a t
|
||||||
(** [of_seq seq] builds a list from a given [Seq.t].
|
(** [of_seq seq] builds a list from a given [Seq.t].
|
||||||
In the result, elements appear in the same order as they did in the source [Seq.t].
|
In the result, elements appear in the same order as they did in the source [Seq.t].
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_gen : 'a t -> 'a gen
|
val to_gen : 'a t -> 'a gen
|
||||||
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)
|
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)
|
||||||
|
|
|
||||||
|
|
@ -83,14 +83,14 @@ module type S = sig
|
||||||
val add_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
val add_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
||||||
(** [add_seq m seq] adds the given [Seq.t] of bindings to the map [m].
|
(** [add_seq m seq] adds the given [Seq.t] of bindings to the map [m].
|
||||||
Like {!add_list}.
|
Like {!add_list}.
|
||||||
Renamed from [add_std_seq] since NEXT_RELEASE.
|
Renamed from [add_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_seq : (key * 'a) Seq.t -> 'a t
|
val of_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** [of_seq seq] builds a map from the given [Seq.t] of bindings.
|
(** [of_seq seq] builds a map from the given [Seq.t] of bindings.
|
||||||
Like {!of_list}.
|
Like {!of_list}.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
||||||
(** [add_iter m iter] adds the given [iter] of bindings to the map [m].
|
(** [add_iter m iter] adds the given [iter] of bindings to the map [m].
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ include module type of struct include Nativeint end
|
||||||
|
|
||||||
val min : t -> t -> t
|
val min : t -> t -> t
|
||||||
(** [min x y] returns the minimum of the two integers [x] and [y].
|
(** [min x y] returns the minimum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val max : t -> t -> t
|
val max : t -> t -> t
|
||||||
(** [max x y] returns the maximum of the two integers [x] and [y].
|
(** [max x y] returns the maximum of the two integers [x] and [y].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val hash : t -> int
|
val hash : t -> int
|
||||||
(** [hash x] computes the hash of [x].
|
(** [hash x] computes the hash of [x].
|
||||||
|
|
@ -34,7 +34,7 @@ val hash : t -> int
|
||||||
val sign : t -> int
|
val sign : t -> int
|
||||||
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
||||||
Same as [compare x zero].
|
Same as [compare x zero].
|
||||||
@since NEXT_RELEASE*)
|
@since 3.0*)
|
||||||
|
|
||||||
val pow : t -> t -> t
|
val pow : t -> t -> t
|
||||||
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
(** [pow base exponent] returns [base] raised to the power of [exponent].
|
||||||
|
|
@ -45,7 +45,7 @@ val pow : t -> t -> t
|
||||||
val floor_div : t -> t -> t
|
val floor_div : t -> t -> t
|
||||||
(** [floor_div x n] is integer division rounding towards negative infinity.
|
(** [floor_div x n] is integer division rounding towards negative infinity.
|
||||||
It satisfies [x = m * floor_div x n + rem x n].
|
It satisfies [x = m * floor_div x n + rem x n].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
type 'a random_gen = Random.State.t -> 'a
|
type 'a random_gen = Random.State.t -> 'a
|
||||||
|
|
@ -57,17 +57,17 @@ val range_by : step:t -> t -> t -> t iter
|
||||||
where the difference between successive elements is [step].
|
where the difference between successive elements is [step].
|
||||||
Use a negative [step] for a decreasing list.
|
Use a negative [step] for a decreasing list.
|
||||||
@raise Invalid_argument if [step=0].
|
@raise Invalid_argument if [step=0].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range : t -> t -> t iter
|
val range : t -> t -> t iter
|
||||||
(** [range i j] iterates on integers from [i] to [j] included . It works
|
(** [range i j] iterates on integers from [i] to [j] included . It works
|
||||||
both for decreasing and increasing ranges.
|
both for decreasing and increasing ranges.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val range' : t -> t -> t iter
|
val range' : t -> t -> t iter
|
||||||
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
(** [range' i j] is like {!range} but the second bound [j] is excluded.
|
||||||
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
For instance [range' 0 5 = Iter.of_list [0;1;2;3;4]].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val random : t -> t random_gen
|
val random : t -> t random_gen
|
||||||
val random_small : t random_gen
|
val random_small : t random_gen
|
||||||
|
|
@ -102,19 +102,19 @@ val of_string_exn : string -> t
|
||||||
|
|
||||||
val to_string_binary : t -> string
|
val to_string_binary : t -> string
|
||||||
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Printing} *)
|
(** {2 Printing} *)
|
||||||
|
|
||||||
val pp : t printer
|
val pp : t printer
|
||||||
(** [pp ppf x] prints the integer [x] on [ppf].
|
(** [pp ppf x] prints the integer [x] on [ppf].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val pp_binary : t printer
|
val pp_binary : t printer
|
||||||
(** [pp_binary ppf x] prints [x] on [ppf].
|
(** [pp_binary ppf x] prints [x] on [ppf].
|
||||||
Print as "0b00101010".
|
Print as "0b00101010".
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
(** {2 Infix Operators} *)
|
(** {2 Infix Operators} *)
|
||||||
|
|
@ -151,15 +151,15 @@ module Infix : sig
|
||||||
|
|
||||||
val ( ** ) : t -> t -> t
|
val ( ** ) : t -> t -> t
|
||||||
(** Alias to {!pow}
|
(** Alias to {!pow}
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--) : t -> t -> t iter
|
val (--) : t -> t -> t iter
|
||||||
(** Alias to {!range}.
|
(** Alias to {!range}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (--^) : t -> t -> t iter
|
val (--^) : t -> t -> t iter
|
||||||
(** Alias to {!range'}.
|
(** Alias to {!range'}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val ( land ) : t -> t -> t
|
val ( land ) : t -> t -> t
|
||||||
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
(** [x land y] is the bitwise logical and of [x] and [y]. *)
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ val flat_map : ('a -> 'b t) -> 'a t -> 'b t
|
||||||
val bind : 'a t -> ('a -> 'b t) -> 'b t
|
val bind : 'a t -> ('a -> 'b t) -> 'b t
|
||||||
(** [bind o f] is [f v] if [o] is [Some v], [None] otherwise.
|
(** [bind o f] is [f v] if [o] is [Some v], [None] otherwise.
|
||||||
Monadic bind.
|
Monadic bind.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
|
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
|
||||||
(** [o >>= f] is the infix version of {!bind}. *)
|
(** [o >>= f] is the infix version of {!bind}. *)
|
||||||
|
|
@ -222,8 +222,8 @@ val to_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_seq o] is [o] as a sequence [Seq.t]. [Some x] is the singleton sequence containing [x]
|
(** [to_seq o] is [o] as a sequence [Seq.t]. [Some x] is the singleton sequence containing [x]
|
||||||
and [None] is the empty sequence.
|
and [None] is the empty sequence.
|
||||||
Same as {!Stdlib.Option.to_seq}
|
Same as {!Stdlib.Option.to_seq}
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> 'a iter
|
val to_iter : 'a t -> 'a iter
|
||||||
(** [to_iter o] returns an internal iterator, like in the library [Iter].
|
(** [to_iter o] returns an internal iterator, like in the library [Iter].
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ val make : 'a -> 'b -> ('a, 'b) t
|
||||||
|
|
||||||
val map_fst : ('a -> 'b) -> ('a * 'c) -> ('b * 'c)
|
val map_fst : ('a -> 'b) -> ('a * 'c) -> ('b * 'c)
|
||||||
(** [map_fst f (x, y)] returns [(f x, y)].
|
(** [map_fst f (x, y)] returns [(f x, y)].
|
||||||
Renamed from [map1] since NEXT_RELEASE. *)
|
Renamed from [map1] since 3.0. *)
|
||||||
|
|
||||||
val map_snd : ('a -> 'b) -> ('c * 'a) -> ('c * 'b)
|
val map_snd : ('a -> 'b) -> ('c * 'a) -> ('c * 'b)
|
||||||
(** [map_snd f (x, y)] returns [(x, f y)].
|
(** [map_snd f (x, y)] returns [(x, f y)].
|
||||||
Renamed from [map2] since NEXT_RELEASE. *)
|
Renamed from [map2] since 3.0. *)
|
||||||
|
|
||||||
val map : ('a -> 'c) -> ('b -> 'd) -> ('a * 'b) -> ('c * 'd)
|
val map : ('a -> 'c) -> ('b -> 'd) -> ('a * 'b) -> ('c * 'd)
|
||||||
(** Synonym to {!( *** )}. Map on both sides of a tuple. *)
|
(** Synonym to {!( *** )}. Map on both sides of a tuple. *)
|
||||||
|
|
@ -26,20 +26,20 @@ val map_same : ('a -> 'b) -> ('a * 'a) -> ('b * 'b)
|
||||||
val map2 : ('a1 -> 'b1 -> 'c1) -> ('a2 -> 'b2 -> 'c2) -> ('a1 * 'a2) ->
|
val map2 : ('a1 -> 'b1 -> 'c1) -> ('a2 -> 'b2 -> 'c2) -> ('a1 * 'a2) ->
|
||||||
('b1 * 'b2) -> ('c1 * 'c2)
|
('b1 * 'b2) -> ('c1 * 'c2)
|
||||||
(** [map2 f g (a,b) (x,y)] return [(f a x, g b y)].
|
(** [map2 f g (a,b) (x,y)] return [(f a x, g b y)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val map_same2 : ('a -> 'b -> 'c) -> ('a * 'a) -> ('b * 'b) -> ('c * 'c)
|
val map_same2 : ('a -> 'b -> 'c) -> ('a * 'a) -> ('b * 'b) -> ('c * 'c)
|
||||||
(** [map_same2 f (a,b) (x,y)] return [(f a x, f b y)].
|
(** [map_same2 f (a,b) (x,y)] return [(f a x, f b y)].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val fst_map : ('a -> 'b) -> ('a * _) -> 'b
|
val fst_map : ('a -> 'b) -> ('a * _) -> 'b
|
||||||
(** Compose the given function with [fst].
|
(** Compose the given function with [fst].
|
||||||
Rename from [map_fst] since NEXT_RELEASE.
|
Rename from [map_fst] since 3.0.
|
||||||
@since 0.3.3 *)
|
@since 0.3.3 *)
|
||||||
|
|
||||||
val snd_map : ('a -> 'b) -> (_ * 'a) -> 'b
|
val snd_map : ('a -> 'b) -> (_ * 'a) -> 'b
|
||||||
(** Compose the given function with [snd].
|
(** Compose the given function with [snd].
|
||||||
Rename from [map_snd] since NEXT_RELEASE.
|
Rename from [map_snd] since 3.0.
|
||||||
@since 0.3.3 *)
|
@since 0.3.3 *)
|
||||||
|
|
||||||
val iter : ('a -> 'b -> unit) -> ('a * 'b) -> unit
|
val iter : ('a -> 'b -> unit) -> ('a * 'b) -> unit
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ val get_or : ('a, _) t -> default:'a -> 'a
|
||||||
val get_lazy : ('e -> 'a) -> ('a, 'e) t -> 'a
|
val get_lazy : ('e -> 'a) -> ('a, 'e) t -> 'a
|
||||||
(** [get_lazy f e] returns [x] if [e = Ok x], [f msg] if [e = Error msg].
|
(** [get_lazy f e] returns [x] if [e = Ok x], [f msg] if [e = Error msg].
|
||||||
This is similar to {!CCOpt.get_lazy}.
|
This is similar to {!CCOpt.get_lazy}.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val get_or_failwith : ('a, string) t -> 'a
|
val get_or_failwith : ('a, string) t -> 'a
|
||||||
(** [get_or_failwith e] returns [x] if [e = Ok x], fails otherwise.
|
(** [get_or_failwith e] returns [x] if [e = Ok x], fails otherwise.
|
||||||
|
|
@ -103,7 +103,7 @@ val get_or_failwith : ('a, string) t -> 'a
|
||||||
|
|
||||||
val get_lazy : ('b -> 'a) -> ('a, 'b) t -> 'a
|
val get_lazy : ('b -> 'a) -> ('a, 'b) t -> 'a
|
||||||
(** [get_lazy default_fn x] unwraps [x], but if [x = Error e] it returns [default_fr e] instead.
|
(** [get_lazy default_fn x] unwraps [x], but if [x = Error e] it returns [default_fr e] instead.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b
|
val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b
|
||||||
(** [map_or f e ~default] returns [f x] if [e = Ok x], [default] otherwise. *)
|
(** [map_or f e ~default] returns [f x] if [e = Ok x], [default] otherwise. *)
|
||||||
|
|
@ -176,7 +176,7 @@ val both : ('a, 'err) t -> ('b, 'err) t -> (('a * 'b), 'err) t
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
|
val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
|
||||||
(** Infix version of [map].
|
(** Infix version of [map].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t
|
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t
|
||||||
(** Infix version of [map] with reversed arguments. *)
|
(** Infix version of [map] with reversed arguments. *)
|
||||||
|
|
@ -263,8 +263,8 @@ val to_iter : ('a, _) t -> 'a iter
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val to_seq : ('a, _) t -> 'a Seq.t
|
val to_seq : ('a, _) t -> 'a Seq.t
|
||||||
(** Renamed from [to_std_seq] since NEXT_RELEASE.
|
(** Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
type ('a, 'b) error = [`Ok of 'a | `Error of 'b]
|
type ('a, 'b) error = [`Ok of 'a | `Error of 'b]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,13 @@ module type S = sig
|
||||||
|
|
||||||
val of_seq : elt Seq.t -> t
|
val of_seq : elt Seq.t -> t
|
||||||
(** Build a set from the given [seq] of elements.
|
(** Build a set from the given [seq] of elements.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val add_seq : elt Seq.t -> t -> t
|
val add_seq : elt Seq.t -> t -> t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
|
|
||||||
val to_iter : t -> elt iter
|
val to_iter : t -> elt iter
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,13 @@ module type S = sig
|
||||||
|
|
||||||
val of_seq : elt Seq.t -> t
|
val of_seq : elt Seq.t -> t
|
||||||
(** Build a set from the given [seq] of elements.
|
(** Build a set from the given [seq] of elements.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val add_seq : elt Seq.t -> t -> t
|
val add_seq : elt Seq.t -> t -> t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val to_iter : t -> elt iter
|
val to_iter : t -> elt iter
|
||||||
(** [to_iter t] converts the set [t] to a [iter] of the elements.
|
(** [to_iter t] converts the set [t] to a [iter] of the elements.
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ val to_iter : t -> char iter
|
||||||
|
|
||||||
val to_seq : t -> char Seq.t
|
val to_seq : t -> char Seq.t
|
||||||
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
|
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
|
||||||
Renamed from [to std_seq] since NEXT_RELEASE.
|
Renamed from [to std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_list : t -> char list
|
val to_list : t -> char list
|
||||||
|
|
@ -92,8 +92,8 @@ val of_iter : char iter -> string
|
||||||
|
|
||||||
val of_seq : char Seq.t -> string
|
val of_seq : char Seq.t -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_list : char list -> string
|
val of_list : char list -> string
|
||||||
(** Convert a list of characters to a string. *)
|
(** Convert a list of characters to a string. *)
|
||||||
|
|
@ -348,8 +348,8 @@ module Split : sig
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
||||||
(** Renamed from [std_seq] since NEXT_RELEASE.
|
(** Renamed from [std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
(** {4 Copying functions}
|
(** {4 Copying functions}
|
||||||
|
|
||||||
|
|
@ -364,8 +364,8 @@ module Split : sig
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
||||||
(** Renamed from [std_seq_cpy] since NEXT_RELEASE.
|
(** Renamed from [std_seq_cpy] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val left : by:string -> string -> (string * string) option
|
val left : by:string -> string -> (string * string) option
|
||||||
(** Split on the first occurrence of [by] from the leftmost part of
|
(** Split on the first occurrence of [by] from the leftmost part of
|
||||||
|
|
@ -420,26 +420,26 @@ val edit_distance : ?cutoff:int -> string -> string -> int
|
||||||
|
|
||||||
(** {2 Infix operators}
|
(** {2 Infix operators}
|
||||||
|
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val (=) : t -> t -> bool
|
val (=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<>) : t -> t -> bool
|
val (<>) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<) : t -> t -> bool
|
val (<) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<=) : t -> t -> bool
|
val (<=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (>=) : t -> t -> bool
|
val (>=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (>) : t -> t -> bool
|
val (>) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
end
|
end
|
||||||
|
|
||||||
include module type of Infix
|
include module type of Infix
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ val to_iter : t -> char iter
|
||||||
|
|
||||||
val to_seq : t -> char Seq.t
|
val to_seq : t -> char Seq.t
|
||||||
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
|
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
|
||||||
Renamed from [to std_seq] since NEXT_RELEASE.
|
Renamed from [to std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_list : t -> char list
|
val to_list : t -> char list
|
||||||
|
|
@ -95,8 +95,8 @@ val of_iter : char iter -> string
|
||||||
|
|
||||||
val of_seq : char Seq.t -> string
|
val of_seq : char Seq.t -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_list : char list -> string
|
val of_list : char list -> string
|
||||||
(** Convert a list of characters to a string. *)
|
(** Convert a list of characters to a string. *)
|
||||||
|
|
@ -367,8 +367,8 @@ module Split : sig
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
||||||
(** Renamed from [std_seq] since NEXT_RELEASE.
|
(** Renamed from [std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
(** {4 Copying functions}
|
(** {4 Copying functions}
|
||||||
|
|
||||||
|
|
@ -383,8 +383,8 @@ module Split : sig
|
||||||
(** @since 2.8 *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
||||||
(** Renamed from [std_seq_cpy] since NEXT_RELEASE.
|
(** Renamed from [std_seq_cpy] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val left : by:(string [@keep_label]) -> string -> (string * string) option
|
val left : by:(string [@keep_label]) -> string -> (string * string) option
|
||||||
(** Split on the first occurrence of [by] from the leftmost part of
|
(** Split on the first occurrence of [by] from the leftmost part of
|
||||||
|
|
@ -439,26 +439,26 @@ val edit_distance : ?cutoff:int -> string -> string -> int
|
||||||
|
|
||||||
(** {2 Infix operators}
|
(** {2 Infix operators}
|
||||||
|
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val (=) : t -> t -> bool
|
val (=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<>) : t -> t -> bool
|
val (<>) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<) : t -> t -> bool
|
val (<) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (<=) : t -> t -> bool
|
val (<=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (>=) : t -> t -> bool
|
val (>=) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (>) : t -> t -> bool
|
val (>) : t -> t -> bool
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
end
|
end
|
||||||
|
|
||||||
include module type of Infix
|
include module type of Infix
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,9 @@ val to_iter : ?idx:int -> t -> uchar iter
|
||||||
|
|
||||||
val to_seq : ?idx:int -> t -> uchar Seq.t
|
val to_seq : ?idx:int -> t -> uchar Seq.t
|
||||||
(** Iter of unicode codepoints.
|
(** Iter of unicode codepoints.
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@param idx offset where to start the decoding.
|
@param idx offset where to start the decoding.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_list : ?idx:int -> t -> uchar list
|
val to_list : ?idx:int -> t -> uchar list
|
||||||
|
|
@ -83,8 +83,8 @@ val concat : t -> t list -> t
|
||||||
|
|
||||||
val of_seq : uchar Seq.t -> t
|
val of_seq : uchar Seq.t -> t
|
||||||
(** Build a string from unicode codepoints
|
(** Build a string from unicode codepoints
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_iter : uchar iter -> t
|
val of_iter : uchar iter -> t
|
||||||
(** Build a string from unicode codepoints
|
(** Build a string from unicode codepoints
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,8 @@ val append_iter : ('a, rw) t -> 'a iter -> unit
|
||||||
|
|
||||||
val append_seq : ('a, rw) t -> 'a Seq.t -> unit
|
val append_seq : ('a, rw) t -> 'a Seq.t -> unit
|
||||||
(** Append content of iterator.
|
(** Append content of iterator.
|
||||||
Renamed from [append_std_seq] since NEXT_RELEASE.
|
Renamed from [append_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val append_list : ('a, rw) t -> 'a list -> unit
|
val append_list : ('a, rw) t -> 'a list -> unit
|
||||||
(** Append content of list.
|
(** Append content of list.
|
||||||
|
|
@ -129,7 +129,7 @@ val truncate : ('a, rw) t -> int -> unit
|
||||||
(** Truncate to the given size (remove elements above this size).
|
(** Truncate to the given size (remove elements above this size).
|
||||||
Does nothing if the parameter is bigger than the current size.
|
Does nothing if the parameter is bigger than the current size.
|
||||||
[truncate] was called [shrink].
|
[truncate] was called [shrink].
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val shrink_to_fit : ('a, _) t -> unit
|
val shrink_to_fit : ('a, _) t -> unit
|
||||||
(** Shrink internal array to fit the size of the vector
|
(** Shrink internal array to fit the size of the vector
|
||||||
|
|
@ -176,7 +176,7 @@ val filter : ('a -> bool) -> ('a,_) t -> ('a, 'mut) t
|
||||||
|
|
||||||
val filter_in_place : ('a -> bool) -> ('a, rw) t -> unit
|
val filter_in_place : ('a -> bool) -> ('a, rw) t -> unit
|
||||||
(** Filter elements from the vector in place.
|
(** Filter elements from the vector in place.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val fold : ('b -> 'a -> 'b) -> 'b -> ('a,_) t -> 'b
|
val fold : ('b -> 'a -> 'b) -> 'b -> ('a,_) t -> 'b
|
||||||
(** Fold on elements of the vector *)
|
(** Fold on elements of the vector *)
|
||||||
|
|
@ -211,8 +211,8 @@ val flat_map : ('a -> ('b,_) t) -> ('a,_) t -> ('b, 'mut) t
|
||||||
|
|
||||||
val flat_map_seq : ('a -> 'b Seq.t) -> ('a,_) t -> ('b, 'mut) t
|
val flat_map_seq : ('a -> 'b Seq.t) -> ('a,_) t -> ('b, 'mut) t
|
||||||
(** Like {!flat_map}, but using [Seq] for intermediate collections.
|
(** Like {!flat_map}, but using [Seq] for intermediate collections.
|
||||||
Renamed from [flat_map_std_seq] since NEXT_RELEASE.
|
Renamed from [flat_map_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val flat_map_list : ('a -> 'b list) -> ('a,_) t -> ('b, 'mut) t
|
val flat_map_list : ('a -> 'b list) -> ('a,_) t -> ('b, 'mut) t
|
||||||
(** Like {!flat_map}, but using {!list} for
|
(** Like {!flat_map}, but using {!list} for
|
||||||
|
|
@ -301,8 +301,8 @@ val of_iter : ?init:('a,rw) t -> 'a iter -> ('a, rw) t
|
||||||
|
|
||||||
val of_seq : ?init:('a,rw) t -> 'a Seq.t -> ('a, rw) t
|
val of_seq : ?init:('a,rw) t -> 'a Seq.t -> ('a, rw) t
|
||||||
(** Convert an Iterator to a vector.
|
(** Convert an Iterator to a vector.
|
||||||
Renamed from [of_std_seq] since NEXT_RELEASE.
|
Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val to_iter : ('a,_) t -> 'a iter
|
val to_iter : ('a,_) t -> 'a iter
|
||||||
(** Return a [iter] with the elements contained in the vector.
|
(** Return a [iter] with the elements contained in the vector.
|
||||||
|
|
@ -317,15 +317,15 @@ val to_iter_rev : ('a,_) t -> 'a iter
|
||||||
|
|
||||||
val to_seq : ('a,_) t -> 'a Seq.t
|
val to_seq : ('a,_) t -> 'a Seq.t
|
||||||
(** Return an iterator with the elements contained in the vector.
|
(** Return an iterator with the elements contained in the vector.
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq_rev : ('a,_) t -> 'a Seq.t
|
val to_seq_rev : ('a,_) t -> 'a Seq.t
|
||||||
(** [to_seq v] returns the sequence of elements of [v] in reverse order,
|
(** [to_seq v] returns the sequence of elements of [v] in reverse order,
|
||||||
that is, the last elements of [v] are iterated on first.
|
that is, the last elements of [v] are iterated on first.
|
||||||
Renamed from [to_std_seq] since NEXT_RELEASE.
|
Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val slice : ('a,rw) t -> ('a array * int * int)
|
val slice : ('a,rw) t -> ('a array * int * int)
|
||||||
|
|
@ -335,7 +335,7 @@ val slice : ('a,rw) t -> ('a array * int * int)
|
||||||
val slice_iter : ('a,_) t -> int -> int -> 'a iter
|
val slice_iter : ('a,_) t -> int -> int -> 'a iter
|
||||||
(** [slice_iter v start len] is the sequence of elements from [v.(start)]
|
(** [slice_iter v start len] is the sequence of elements from [v.(start)]
|
||||||
to [v.(start+len-1)].
|
to [v.(start+len-1)].
|
||||||
@since NEXT_RELEASE
|
@since 3.0
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val of_gen : ?init:('a, rw) t -> 'a gen -> ('a, rw) t
|
val of_gen : ?init:('a, rw) t -> 'a gen -> ('a, rw) t
|
||||||
|
|
|
||||||
|
|
@ -117,28 +117,28 @@ val of_list : 'a list -> 'a t
|
||||||
val to_list : 'a t -> 'a list
|
val to_list : 'a t -> 'a list
|
||||||
|
|
||||||
val add_iter_front : 'a iter -> 'a t -> 'a t
|
val add_iter_front : 'a iter -> 'a t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val add_iter_back : 'a t -> 'a iter -> 'a t
|
val add_iter_back : 'a t -> 'a iter -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> 'a iter
|
val to_iter : 'a t -> 'a iter
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val add_seq_front : 'a Seq.t -> 'a t -> 'a t
|
val add_seq_front : 'a Seq.t -> 'a t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val add_seq_back : 'a t -> 'a Seq.t -> 'a t
|
val add_seq_back : 'a t -> 'a Seq.t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val of_seq : 'a Seq.t -> 'a t
|
val of_seq : 'a Seq.t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val (--) : int -> int -> int t
|
val (--) : int -> int -> int t
|
||||||
(** [a -- b] is the integer range from [a] to [b], both included.
|
(** [a -- b] is the integer range from [a] to [b], both included.
|
||||||
|
|
|
||||||
|
|
@ -111,13 +111,13 @@ val to_gen : 'a t -> (int * 'a) gen
|
||||||
(** @since 0.13 *)
|
(** @since 0.13 *)
|
||||||
|
|
||||||
val add_seq : 'a t -> (int * 'a) Seq.t -> 'a t
|
val add_seq : 'a t -> (int * 'a) Seq.t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val of_seq : (int * 'a) Seq.t -> 'a t
|
val of_seq : (int * 'a) Seq.t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> (int * 'a) Seq.t
|
val to_seq : 'a t -> (int * 'a) Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 3.0 *)
|
||||||
|
|
||||||
type 'a tree = unit -> [`Nil | `Node of 'a * 'a tree list]
|
type 'a tree = unit -> [`Nil | `Node of 'a * 'a tree list]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,16 +84,16 @@ val add_iter : 'a t -> 'a iter -> 'a t
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a Seq.t
|
val to_seq : 'a t -> 'a Seq.t
|
||||||
(** Renamed from [to_std_seq] since NEXT_RELEASE.
|
(** Renamed from [to_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val add_seq : 'a t -> 'a Seq.t -> 'a t
|
val add_seq : 'a t -> 'a Seq.t -> 'a t
|
||||||
(** Renamed from [add_std_seq] since NEXT_RELEASE.
|
(** Renamed from [add_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_seq : 'a Seq.t -> 'a t
|
val of_seq : 'a Seq.t -> 'a t
|
||||||
(** Renamed from [of_std_seq] since NEXT_RELEASE.
|
(** Renamed from [of_std_seq] since 3.0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.0 *)
|
||||||
|
|
||||||
val of_gen : 'a gen -> 'a t
|
val of_gen : 'a gen -> 'a t
|
||||||
val add_gen : 'a t -> 'a gen -> 'a t
|
val add_gen : 'a t -> 'a gen -> 'a t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue