prepare for 3.0~rc1

This commit is contained in:
Simon Cruanes 2020-07-28 18:15:05 -04:00
parent 2eb58dd6c4
commit add6a58cf5
30 changed files with 200 additions and 200 deletions

View file

@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.8.1"
version: "3.0~rc1"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
synopsis: "A set of advanced datatypes for containers"

View file

@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.8.1"
version: "3.0~rc1"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
synopsis: "An extension of containers for threading"

View file

@ -1,6 +1,6 @@
opam-version: "2.0"
name: "containers"
version: "2.8.1"
version: "3.0~rc1"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
synopsis: "A modular, clean and powerful extension of the OCaml standard library"

View file

@ -92,7 +92,7 @@ val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
(** [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
@ -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].
The input array [a] is shared with the sequence and modification of it will result
in modification of the sequence.
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to_std_seq] since 3.0.
@since 3.0
*)
val to_gen : 'a t -> 'a gen

View file

@ -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
(** [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
@ -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].
The input array [a] is shared with the sequence and modification of it will result
in modification of the sequence.
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to_std_seq] since 3.0.
@since 3.0
*)
val to_gen : 'a t -> 'a gen

View file

@ -40,13 +40,13 @@ val map : ('a -> 'b) -> 'b t -> 'a t
val always_eq : _ t
(** Always returns true. All values are equal.
@since NEXT_RELEASE *)
@since 3.0 *)
val never_eq : _ t
(** Always returns false. No values are, so this
is not even reflexive (i.e. [x=x] is false).
Be careful!
@since NEXT_RELEASE *)
@since 3.0 *)
module Infix : sig
val (>|=) : 'b t -> ('a -> 'b) -> 'a t

View file

@ -32,7 +32,7 @@ val epsilon : t
val pi : t
(** [pi] is the constant pi. The ratio of a circumference to its diameter.
@since NEXT_RELEASE *)
@since 3.0 *)
val is_nan : t -> bool
(** [is_nan f] returns [true] if f is NaN, [false] otherwise. *)
@ -108,7 +108,7 @@ val of_string_exn : string -> t
@since 1.2 *)
val of_string_opt : string -> t option
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val equal_precision : epsilon:t -> t -> t -> bool
(** Equality with allowed error up to a non negative epsilon value. *)

View file

@ -32,7 +32,7 @@ val float : float printer
val exn : exn printer
(** Printer using {!Printexc.to_string}.
@since NEXT_RELEASE *)
@since 3.0 *)
val newline : unit printer
(** Force newline (see {!Format.pp_force_newline}).

View file

@ -74,8 +74,8 @@ module Poly : sig
val add_seq : ('a,'b) Hashtbl.t -> ('a * 'b) Seq.t -> unit
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
Renamed from [add_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [add_std_seq] since 3.0.
@since 3.0 *)
val of_iter : ('a * 'b) iter -> ('a,'b) Hashtbl.t
(** 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
(** From the given bindings, added in order.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val add_iter_count : ('a, int) Hashtbl.t -> 'a iter -> unit
(** [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]
by calling {!incr}. This is useful for counting how many times each
element of [seq] occurs.
Renamed from [add_std_seq_count] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [add_std_seq_count] since 3.0.
@since 3.0 *)
val of_iter_count : 'a iter -> ('a, int) Hashtbl.t
(** 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
(** Like {!add_seq_count}, but allocates a new table and returns it.
Renamed from [of_std_seq_count] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq_count] since 3.0.
@since 3.0 *)
val to_list : ('a,'b) Hashtbl.t -> ('a * 'b) list
(** [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
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
Renamed from [add_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [add_std_seq] since 3.0.
@since 3.0 *)
val of_iter : (key * 'a) iter -> 'a t
(** From the given bindings, added in order.
@ -216,8 +216,8 @@ module type S = sig
val of_seq : (key * 'a) Seq.t -> 'a t
(** From the given bindings, added in order.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val add_iter_count : int t -> key iter -> unit
(** [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]
by calling {!incr}. This is useful for counting how many times each
element of [seq] occurs.
Renamed from [of_std_seq_count] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq_count] since 3.0.
@since 3.0 *)
val of_iter_count : key iter -> int t
(** 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
(** Like {!add_seq_count}, but allocates a new table and returns it.
Renamed from [of_std_seq_count] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq_count] since 3.0.
@since 3.0 *)
val to_list : 'a t -> (key * 'a) list
(** [to_list tbl] returns the list of (key,value) bindings (order unspecified). *)

View file

@ -113,8 +113,8 @@ module type S = sig
val add_seq : t -> elt Seq.t -> t
(** [add_seq h seq] is like {!add_list}.
Renamed from [add_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [add_std_seq] since 3.0.
@since 3.0 *)
val of_iter : elt iter -> t
(** [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
(** [of_seq seq] builds a heap from a given [Seq.t]. Complexity: [O(n log n)].
Renamed from [of_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_seq] since 3.0.
@since 3.0 *)
val to_iter : t -> elt iter
(** [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
(** [to_seq h] returns a [Seq.t] of the elements of the heap [h].
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
val to_iter_sorted : t -> elt iter
(** [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
(** [to_seq_sorted h] returns a [Seq.t] by iterating on the elements of [h],
in increasing order.
Renamed from [to_std_seq_sorted] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq_sorted] since 3.0.
@since 3.0 *)
val add_gen : t -> elt gen -> t
(** [add_gen h gen] adds the gen [gen] to the heap [h].

View file

@ -132,7 +132,7 @@ val with_in_out : ?mode:int -> ?flags:open_flag list ->
val copy_into : ?bufsize:int -> in_channel -> out_channel -> unit
(** [copy_into ic oc] writes the content of [ic] into [oc].
It is a blocking call.
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Misc for Generators} *)

View file

@ -9,52 +9,52 @@ type t = int
val zero : t
(** [zero] is the integer [0].
@since NEXT_RELEASE *)
@since 3.0 *)
val one : t
(** [one] is the integer [1].
@since NEXT_RELEASE *)
@since 3.0 *)
val minus_one : t
(** [minus_one] is the integer [-1].
@since NEXT_RELEASE *)
@since 3.0 *)
val add : t -> t -> t
(** [add x y] is [x + y].
@since NEXT_RELEASE *)
@since 3.0 *)
val sub : t -> t -> t
(** [sub x y] is [x - y].
@since NEXT_RELEASE *)
@since 3.0 *)
val mul : t -> t -> t
(** [mul x y] is [x * y].
@since NEXT_RELEASE *)
@since 3.0 *)
val div : t -> t -> t
(** [div x y] is [x / y]
@since NEXT_RELEASE *)
@since 3.0 *)
val succ : t -> t
(** [succ x] is [x + 1].
@since NEXT_RELEASE *)
@since 3.0 *)
val pred : t -> t
(** [pred x] is [x - 1].
@since NEXT_RELEASE *)
@since 3.0 *)
val abs : t -> t
(** [abs x] is the absolute value of [x]. It is [x] if [x] is positive
and [neg x] otherwise.
@since NEXT_RELEASE *)
@since 3.0 *)
val max_int : t
(** [max_int] is the maximum integer.
@since NEXT_RELEASE *)
@since 3.0 *)
val min_int : t
(** [min_int] is the minimum integer.
@since NEXT_RELEASE *)
@since 3.0 *)
val compare : t -> t -> int
(** [compare x y] is the comparison function for integers
@ -105,11 +105,11 @@ val pp : t printer
val to_float : t -> float
(** [to_float] is the same as [float_of_int]
@since NEXT_RELEASE*)
@since 3.0*)
val of_float : float -> t
(** [to_float] is the same as [int_of_float]
@since NEXT_RELEASE*)
@since 3.0*)
val to_string : t -> string
(** [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.
Alias to {!int_of_string}.
@raise Failure in case of failure.
@since NEXT_RELEASE *)
@since 3.0 *)
val of_float : float -> t
(** [of_float x] converts the given floating-point number [x] to an integer.
Alias to {!int_of_float}.
@since NEXT_RELEASE *)
@since 3.0 *)
val pp_binary : t printer
(** [pp_binary ppf x] prints [x] on [ppf].
@ -167,35 +167,35 @@ val range' : t -> t -> t iter
val popcount : t -> int
(** Number of bits set to 1
@since NEXT_RELEASE *)
@since 3.0 *)
val logand : t -> t -> t
(** [logand] is the same as [(land)].
@since NEXT_RELEASE *)
@since 3.0 *)
val logor : t -> t -> t
(** [logand] is the same as [(lor)].
@since NEXT_RELEASE *)
@since 3.0 *)
val logxor : t -> t -> t
(** [logxor] is the same as [(lxor)].
@since NEXT_RELEASE *)
@since 3.0 *)
val lognot : t -> t
(** [logand] is the same as [lnot].
@since NEXT_RELEASE *)
@since 3.0 *)
val shift_left : t -> int -> t
(** [shift_left] is the same as [(lsl)].
@since NEXT_RELEASE *)
@since 3.0 *)
val shift_right : t -> int -> t
(** [shift_right] is the same as [(asr)].
@since NEXT_RELEASE *)
@since 3.0 *)
val shift_right_logical : t -> int -> t
(** [shift_right_logical] is the same as [(lsr)].
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Infix Operators}

View file

@ -20,11 +20,11 @@ include module type of struct include Int32 end
val min : t -> t -> t
(** [min x y] returns the minimum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val max : t -> t -> t
(** [max x y] returns the maximum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val hash : t -> int
(** [hash x] computes the hash of [x].
@ -33,7 +33,7 @@ val hash : t -> int
val sign : t -> int
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
Same as [compare x zero].
@since NEXT_RELEASE*)
@since 3.0*)
val pow : t -> t -> t
(** [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
(** [floor_div x n] is integer division rounding towards negative infinity.
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 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].
Use a negative [step] for a decreasing list.
@raise Invalid_argument if [step=0].
@since NEXT_RELEASE *)
@since 3.0 *)
val range : t -> t -> t iter
(** [range i j] iterates on integers from [i] to [j] included . It works
both for decreasing and increasing ranges.
@since NEXT_RELEASE *)
@since 3.0 *)
val range' : t -> t -> t iter
(** [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]].
@since NEXT_RELEASE *)
@since 3.0 *)
val random : t -> 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
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Printing} *)
val pp : t printer
(** [pp ppf x] prints the integer [x] on [ppf].
@since NEXT_RELEASE *)
@since 3.0 *)
val pp_binary : t printer
(** [pp_binary ppf x] prints [x] on [ppf].
Print as "0b00101010".
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Infix Operators} *)
@ -151,15 +151,15 @@ module Infix : sig
val ( ** ) : t -> t -> t
(** Alias to {!pow}
@since NEXT_RELEASE *)
@since 3.0 *)
val (--) : t -> t -> t iter
(** Alias to {!range}.
@since NEXT_RELEASE *)
@since 3.0 *)
val (--^) : t -> t -> t iter
(** Alias to {!range'}.
@since NEXT_RELEASE *)
@since 3.0 *)
val ( land ) : t -> t -> t
(** [x land y] is the bitwise logical and of [x] and [y]. *)

View file

@ -20,11 +20,11 @@ include module type of struct include Int64 end
val min : t -> t -> t
(** [min x y] returns the minimum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val max : t -> t -> t
(** [max x y] returns the maximum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val hash : t -> int
(** [hash x] computes the hash of [x].
@ -33,7 +33,7 @@ val hash : t -> int
val sign : t -> int
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
Same as [compare x zero].
@since NEXT_RELEASE*)
@since 3.0*)
val pow : t -> t -> t
(** [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
(** [floor_div x n] is integer division rounding towards negative infinity.
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 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].
Use a negative [step] for a decreasing list.
@raise Invalid_argument if [step=0].
@since NEXT_RELEASE *)
@since 3.0 *)
val range : t -> t -> t iter
(** [range i j] iterates on integers from [i] to [j] included . It works
both for decreasing and increasing ranges.
@since NEXT_RELEASE *)
@since 3.0 *)
val range' : t -> t -> t iter
(** [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]].
@since NEXT_RELEASE *)
@since 3.0 *)
val random : t -> 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
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Printing} *)
val pp : t printer
(** [pp ppf x] prints the integer [x] on [ppf].
@since NEXT_RELEASE *)
@since 3.0 *)
val pp_binary : t printer
(** [pp_binary ppf x] prints [x] on [ppf].
Print as "0b00101010".
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Infix Operators} *)
@ -154,15 +154,15 @@ module Infix : sig
val ( ** ) : t -> t -> t
(** Alias to {!pow}
@since NEXT_RELEASE *)
@since 3.0 *)
val (--) : t -> t -> t iter
(** Alias to {!range}.
@since NEXT_RELEASE *)
@since 3.0 *)
val (--^) : t -> t -> t iter
(** Alias to {!range'}.
@since NEXT_RELEASE *)
@since 3.0 *)
val ( land ) : t -> t -> t
(** [x land y] is the bitwise logical and of [x] and [y]. *)

View file

@ -755,8 +755,8 @@ val to_iter : 'a t -> 'a iter
val to_seq : 'a t -> 'a Seq.t
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
val of_iter : 'a iter -> 'a t
(** [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
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
Renamed from [to_std_seq_rev] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq_rev] since 3.0.
@since 3.0 *)
val of_seq : 'a Seq.t -> 'a 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].
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val to_gen : 'a t -> 'a gen
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)

View file

@ -759,8 +759,8 @@ val to_iter : 'a t -> 'a iter
val to_seq : 'a t -> 'a Seq.t
(** [to_seq l] returns a [Seq.t] of the elements of the list [l].
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
val of_iter : 'a iter -> 'a t
(** [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
(** [of_seq_rev seq] builds a list from a given [Seq.t], in reverse order.
Renamed from [of_std_seq_rev] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq_rev] since 3.0.
@since 3.0 *)
val of_seq : 'a Seq.t -> 'a 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].
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val to_gen : 'a t -> 'a gen
(** [to_gen l] returns a [gen] of the elements of the list [l]. *)

View file

@ -83,14 +83,14 @@ module type S = sig
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].
Like {!add_list}.
Renamed from [add_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [add_std_seq] since 3.0.
@since 3.0 *)
val of_seq : (key * 'a) Seq.t -> 'a t
(** [of_seq seq] builds a map from the given [Seq.t] of bindings.
Like {!of_list}.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val add_iter : 'a t -> (key * 'a) iter -> 'a t
(** [add_iter m iter] adds the given [iter] of bindings to the map [m].

View file

@ -21,11 +21,11 @@ include module type of struct include Nativeint end
val min : t -> t -> t
(** [min x y] returns the minimum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val max : t -> t -> t
(** [max x y] returns the maximum of the two integers [x] and [y].
@since NEXT_RELEASE *)
@since 3.0 *)
val hash : t -> int
(** [hash x] computes the hash of [x].
@ -34,7 +34,7 @@ val hash : t -> int
val sign : t -> int
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
Same as [compare x zero].
@since NEXT_RELEASE*)
@since 3.0*)
val pow : t -> t -> t
(** [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
(** [floor_div x n] is integer division rounding towards negative infinity.
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 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].
Use a negative [step] for a decreasing list.
@raise Invalid_argument if [step=0].
@since NEXT_RELEASE *)
@since 3.0 *)
val range : t -> t -> t iter
(** [range i j] iterates on integers from [i] to [j] included . It works
both for decreasing and increasing ranges.
@since NEXT_RELEASE *)
@since 3.0 *)
val range' : t -> t -> t iter
(** [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]].
@since NEXT_RELEASE *)
@since 3.0 *)
val random : t -> 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
(** [to_string_binary x] returns the string representation of the integer [x], in binary.
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Printing} *)
val pp : t printer
(** [pp ppf x] prints the integer [x] on [ppf].
@since NEXT_RELEASE *)
@since 3.0 *)
val pp_binary : t printer
(** [pp_binary ppf x] prints [x] on [ppf].
Print as "0b00101010".
@since NEXT_RELEASE *)
@since 3.0 *)
(** {2 Infix Operators} *)
@ -151,15 +151,15 @@ module Infix : sig
val ( ** ) : t -> t -> t
(** Alias to {!pow}
@since NEXT_RELEASE *)
@since 3.0 *)
val (--) : t -> t -> t iter
(** Alias to {!range}.
@since NEXT_RELEASE *)
@since 3.0 *)
val (--^) : t -> t -> t iter
(** Alias to {!range'}.
@since NEXT_RELEASE *)
@since 3.0 *)
val ( land ) : t -> t -> t
(** [x land y] is the bitwise logical and of [x] and [y]. *)

View file

@ -44,7 +44,7 @@ val flat_map : ('a -> 'b t) -> 'a 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.
Monadic bind.
@since NEXT_RELEASE *)
@since 3.0 *)
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
(** [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]
and [None] is the empty sequence.
Same as {!Stdlib.Option.to_seq}
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
val to_iter : 'a t -> 'a iter
(** [to_iter o] returns an internal iterator, like in the library [Iter].

View file

@ -11,11 +11,11 @@ val make : 'a -> 'b -> ('a, 'b) t
val map_fst : ('a -> 'b) -> ('a * 'c) -> ('b * 'c)
(** [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)
(** [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)
(** 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) ->
('b1 * 'b2) -> ('c1 * 'c2)
(** [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)
(** [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
(** Compose the given function with [fst].
Rename from [map_fst] since NEXT_RELEASE.
Rename from [map_fst] since 3.0.
@since 0.3.3 *)
val snd_map : ('a -> 'b) -> (_ * 'a) -> 'b
(** Compose the given function with [snd].
Rename from [map_snd] since NEXT_RELEASE.
Rename from [map_snd] since 3.0.
@since 0.3.3 *)
val iter : ('a -> 'b -> unit) -> ('a * 'b) -> unit

View file

@ -94,7 +94,7 @@ val get_or : ('a, _) t -> default:'a -> '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].
This is similar to {!CCOpt.get_lazy}.
@since NEXT_RELEASE *)
@since 3.0 *)
val get_or_failwith : ('a, string) t -> 'a
(** [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
(** [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
(** [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
val (<$>) : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
(** Infix version of [map].
@since NEXT_RELEASE *)
@since 3.0 *)
val (>|=) : ('a, 'err) t -> ('a -> 'b) -> ('b, 'err) t
(** Infix version of [map] with reversed arguments. *)
@ -263,8 +263,8 @@ val to_iter : ('a, _) t -> 'a iter
(** @since 2.8 *)
val to_seq : ('a, _) t -> 'a Seq.t
(** Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
type ('a, 'b) error = [`Ok of 'a | `Error of 'b]

View file

@ -56,13 +56,13 @@ module type S = sig
val of_seq : elt Seq.t -> t
(** Build a set from the given [seq] of elements.
@since NEXT_RELEASE *)
@since 3.0 *)
val add_iter : t -> elt iter -> t
(** @since 2.8 *)
val add_seq : elt Seq.t -> t -> t
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val to_iter : t -> elt iter

View file

@ -55,13 +55,13 @@ module type S = sig
val of_seq : elt Seq.t -> t
(** Build a set from the given [seq] of elements.
@since NEXT_RELEASE *)
@since 3.0 *)
val add_iter : t -> elt iter -> t
(** @since 2.8 *)
val add_seq : elt Seq.t -> t -> t
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val to_iter : t -> elt iter
(** [to_iter t] converts the set [t] to a [iter] of the elements.

View file

@ -45,8 +45,8 @@ val to_iter : t -> char iter
val to_seq : t -> char Seq.t
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
Renamed from [to std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to std_seq] since 3.0.
@since 3.0
*)
val to_list : t -> char list
@ -92,8 +92,8 @@ val of_iter : char iter -> string
val of_seq : char Seq.t -> string
(** Convert a [sequence] of characters to a string.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val of_list : char list -> string
(** Convert a list of characters to a string. *)
@ -348,8 +348,8 @@ module Split : sig
(** @since 2.8 *)
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
(** Renamed from [std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [std_seq] since 3.0.
@since 3.0 *)
(** {4 Copying functions}
@ -364,8 +364,8 @@ module Split : sig
(** @since 2.8 *)
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
(** Renamed from [std_seq_cpy] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [std_seq_cpy] since 3.0.
@since 3.0 *)
val left : by:string -> string -> (string * string) option
(** 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}
@since NEXT_RELEASE *)
@since 3.0 *)
module Infix : sig
val (=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<>) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (>=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (>) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
end
include module type of Infix

View file

@ -43,8 +43,8 @@ val to_iter : t -> char iter
val to_seq : t -> char Seq.t
(** [to_seq s] returns a [Seq.t] of the bytes in [s].
Renamed from [to std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to std_seq] since 3.0.
@since 3.0
*)
val to_list : t -> char list
@ -95,8 +95,8 @@ val of_iter : char iter -> string
val of_seq : char Seq.t -> string
(** Convert a [sequence] of characters to a string.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val of_list : char list -> string
(** Convert a list of characters to a string. *)
@ -367,8 +367,8 @@ module Split : sig
(** @since 2.8 *)
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
(** Renamed from [std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [std_seq] since 3.0.
@since 3.0 *)
(** {4 Copying functions}
@ -383,8 +383,8 @@ module Split : sig
(** @since 2.8 *)
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
(** Renamed from [std_seq_cpy] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [std_seq_cpy] since 3.0.
@since 3.0 *)
val left : by:(string [@keep_label]) -> string -> (string * string) option
(** 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}
@since NEXT_RELEASE *)
@since 3.0 *)
module Infix : sig
val (=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<>) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (<=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (>=) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (>) : t -> t -> bool
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
end
include module type of Infix

View file

@ -52,9 +52,9 @@ val to_iter : ?idx:int -> t -> uchar iter
val to_seq : ?idx:int -> t -> uchar Seq.t
(** 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.
@since NEXT_RELEASE
@since 3.0
*)
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
(** Build a string from unicode codepoints
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val of_iter : uchar iter -> t
(** Build a string from unicode codepoints

View file

@ -87,8 +87,8 @@ val append_iter : ('a, rw) t -> 'a iter -> unit
val append_seq : ('a, rw) t -> 'a Seq.t -> unit
(** Append content of iterator.
Renamed from [append_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [append_std_seq] since 3.0.
@since 3.0 *)
val append_list : ('a, rw) t -> 'a list -> unit
(** 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).
Does nothing if the parameter is bigger than the current size.
[truncate] was called [shrink].
@since NEXT_RELEASE *)
@since 3.0 *)
val shrink_to_fit : ('a, _) t -> unit
(** 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
(** Filter elements from the vector in place.
@since NEXT_RELEASE *)
@since 3.0 *)
val fold : ('b -> 'a -> 'b) -> 'b -> ('a,_) t -> 'b
(** 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
(** Like {!flat_map}, but using [Seq] for intermediate collections.
Renamed from [flat_map_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [flat_map_std_seq] since 3.0.
@since 3.0 *)
val flat_map_list : ('a -> 'b list) -> ('a,_) t -> ('b, 'mut) t
(** 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
(** Convert an Iterator to a vector.
Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val to_iter : ('a,_) t -> 'a iter
(** 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
(** Return an iterator with the elements contained in the vector.
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to_std_seq] since 3.0.
@since 3.0
*)
val to_seq_rev : ('a,_) t -> 'a Seq.t
(** [to_seq v] returns the sequence of elements of [v] in reverse order,
that is, the last elements of [v] are iterated on first.
Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE
Renamed from [to_std_seq] since 3.0.
@since 3.0
*)
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
(** [slice_iter v start len] is the sequence of elements from [v.(start)]
to [v.(start+len-1)].
@since NEXT_RELEASE
@since 3.0
*)
val of_gen : ?init:('a, rw) t -> 'a gen -> ('a, rw) t

View file

@ -117,28 +117,28 @@ val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
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
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val to_iter : 'a t -> 'a iter
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val of_iter : 'a iter -> 'a t
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
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
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val to_seq : 'a t -> 'a Seq.t
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val of_seq : 'a Seq.t -> 'a t
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
val (--) : int -> int -> int t
(** [a -- b] is the integer range from [a] to [b], both included.

View file

@ -111,13 +111,13 @@ val to_gen : 'a t -> (int * 'a) gen
(** @since 0.13 *)
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
(** @since NEXT_RELEASE *)
(** @since 3.0 *)
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]

View file

@ -84,16 +84,16 @@ val add_iter : 'a t -> 'a iter -> 'a t
val of_iter : 'a iter -> 'a t
val to_seq : 'a t -> 'a Seq.t
(** Renamed from [to_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [to_std_seq] since 3.0.
@since 3.0 *)
val add_seq : 'a t -> 'a Seq.t -> 'a t
(** Renamed from [add_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [add_std_seq] since 3.0.
@since 3.0 *)
val of_seq : 'a Seq.t -> 'a t
(** Renamed from [of_std_seq] since NEXT_RELEASE.
@since NEXT_RELEASE *)
(** Renamed from [of_std_seq] since 3.0.
@since 3.0 *)
val of_gen : 'a gen -> 'a t
val add_gen : 'a t -> 'a gen -> 'a t