mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
prepare for 2.8
This commit is contained in:
parent
ab494fb753
commit
5126973173
32 changed files with 218 additions and 183 deletions
36
CHANGELOG.md
36
CHANGELOG.md
|
|
@ -1,5 +1,41 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2.8
|
||||||
|
|
||||||
|
### Breaking:
|
||||||
|
|
||||||
|
- bump minimum version of OCaml to 4.03, drop deps `{result,uchar}`
|
||||||
|
- deprecate `{of,to}_seq` a bit everywhere
|
||||||
|
- deprecate `CCKList` as it's subsumed by `Seq`
|
||||||
|
|
||||||
|
- feat: on `>= 4.08`, support let+ and let* operators
|
||||||
|
- feat(list): add indexed functions and `fold_on_map`
|
||||||
|
- refactor: also port `CCGraph` to iter
|
||||||
|
- feat: add `{to,of,add}_{iter,std_seq}` where relevant
|
||||||
|
- feat(unix): add `ensure_session_leader` and add some docs
|
||||||
|
- feat(pool): add infix operators on futures
|
||||||
|
- fix(pp): improve printing of hashtables
|
||||||
|
- feat: add `monoid_product` to Array and Vector
|
||||||
|
- improved gc behavior for `CCvector`
|
||||||
|
- deprecate `CCVector.fill_empty_slots_with`
|
||||||
|
- `CCVector.shrink_to_fit` to limit memory usage
|
||||||
|
- add `CCVector.clear_and_reset`
|
||||||
|
- feat(sexp): expose `parse_string_list` and the list decoder
|
||||||
|
- add `CCUnix.with_temp_dir` function
|
||||||
|
- deprecate `CCOpt.to_seq`, provide `to_iter` instead
|
||||||
|
- add `CCOpt.value` to improve compat with `Stdlib.Option`
|
||||||
|
- add `CCVector.mapi`
|
||||||
|
|
||||||
|
- fix: restore `CCSexp.atom` and `list` which was lost in 2.7
|
||||||
|
- fix(sexp): set location properly when parsing a file
|
||||||
|
- fix: properly alias to `CCChar` in containers.ml
|
||||||
|
|
||||||
|
- use older dune dialect
|
||||||
|
- remove unlabel, remove all traces of Result
|
||||||
|
- require dune configurator explicitly in opam
|
||||||
|
- Re-enable mdx tests
|
||||||
|
- fix benchs so they don't depend on clarity and they compile again
|
||||||
|
|
||||||
## 2.7
|
## 2.7
|
||||||
|
|
||||||
- deprecate CCKList in favor of the standard Seq
|
- deprecate CCKList in favor of the standard Seq
|
||||||
|
|
|
||||||
|
|
@ -611,7 +611,6 @@ can be removed.
|
||||||
- `make update_next_tag` (to update `@since` comments; be careful not to change symlinks)
|
- `make update_next_tag` (to update `@since` comments; be careful not to change symlinks)
|
||||||
- check status of modules (`{b status: foo}`) and update if required;
|
- check status of modules (`{b status: foo}`) and update if required;
|
||||||
removed deprecated functions, etc.
|
removed deprecated functions, etc.
|
||||||
- `make unlabel` to see if labelled interfaces are up to date (requires compiler-libs)
|
|
||||||
- update `CHANGELOG.md` (see its end to find the right git command)
|
- update `CHANGELOG.md` (see its end to find the right git command)
|
||||||
- commit the changes
|
- commit the changes
|
||||||
- `make test doc`
|
- `make test doc`
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
name: "containers"
|
name: "containers"
|
||||||
version: "2.7"
|
version: "2.8"
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
@ -261,13 +261,13 @@ val to_iter : 'a t -> 'a iter
|
||||||
(** [to_iter a] returns an [iter] of the elements of an array [a].
|
(** [to_iter a] returns an [iter] 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 iterator.
|
in modification of the iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_std_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_std_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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
|
|
@ -323,7 +323,7 @@ val filter_map : ('a -> 'b option) -> 'a t -> 'b t
|
||||||
|
|
||||||
val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
||||||
(** All combinaisons of tuples from the two arrays are passed to the function
|
(** All combinaisons of tuples from the two arrays are passed to the function
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val flat_map : ('a -> 'b t) -> 'a t -> 'b array
|
val flat_map : ('a -> 'b t) -> 'a t -> 'b array
|
||||||
(** [flat_map f a] transforms each element of [a] into an array, then flattens. *)
|
(** [flat_map f a] transforms each element of [a] into an array, then flattens. *)
|
||||||
|
|
@ -401,10 +401,10 @@ module Infix : sig
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
@ -261,13 +261,13 @@ val to_iter : 'a t -> 'a iter
|
||||||
(** [to_iter a] returns an [iter] of the elements of an array [a].
|
(** [to_iter a] returns an [iter] 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 iterator.
|
in modification of the iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_std_seq a] returns a [Seq.t] of the elements of an array [a].
|
(** [to_std_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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
|
|
@ -323,7 +323,7 @@ val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
|
||||||
|
|
||||||
val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
||||||
(** All combinaisons of tuples from the two arrays are passed to the function
|
(** All combinaisons of tuples from the two arrays are passed to the function
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val flat_map : f:('a -> 'b t) -> 'a t -> 'b array
|
val flat_map : f:('a -> 'b t) -> 'a t -> 'b array
|
||||||
(** [flat_map ~f a] transforms each element of [a] into an array, then flattens. *)
|
(** [flat_map ~f a] transforms each element of [a] into an array, then flattens. *)
|
||||||
|
|
@ -401,10 +401,10 @@ module Infix : sig
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
include CCShimsMkLet_.S with type 'a t_let := 'a array
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
@ -249,13 +249,13 @@ val to_iter : 'a t -> 'a iter
|
||||||
(** [to_iter a] returns an [iter] of the elements of a slice [a].
|
(** [to_iter a] returns an [iter] of the elements of a slice [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 iterator.
|
in modification of the iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [a].
|
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
@ -246,13 +246,13 @@ val to_iter : 'a t -> 'a iter
|
||||||
(** [to_iter a] returns an [iter] of the elements of a slice [a].
|
(** [to_iter a] returns an [iter] of the elements of a slice [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 iterator.
|
in modification of the iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [a].
|
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : 'a t -> (key * 'a) iter
|
val to_iter : 'a t -> (key * 'a) iter
|
||||||
(** Iterate on bindings in the table.
|
(** Iterate on bindings in the table.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> (key * 'a) sequence
|
val to_seq : 'a t -> (key * 'a) sequence
|
||||||
(** Iterate on values in the table.
|
(** Iterate on values in the table.
|
||||||
|
|
@ -220,11 +220,11 @@ module type S = sig
|
||||||
|
|
||||||
val add_iter : 'a t -> (key * 'a) iter -> unit
|
val add_iter : 'a t -> (key * 'a) iter -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : 'a t -> (key * 'a) Seq.t -> unit
|
val add_std_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}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq : 'a t -> (key * 'a) sequence -> unit
|
val add_seq : 'a t -> (key * 'a) sequence -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
|
|
@ -234,11 +234,11 @@ module type S = sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (key * 'a) sequence -> 'a t
|
val of_seq : (key * 'a) sequence -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
|
|
@ -249,13 +249,13 @@ module type S = sig
|
||||||
(** [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]
|
||||||
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 [i] occurs.
|
element of [i] occurs.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq_count : int t -> key Seq.t -> unit
|
val add_std_seq_count : int t -> key Seq.t -> unit
|
||||||
(** [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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq_count : int t -> key sequence -> unit
|
val add_seq_count : int t -> key sequence -> unit
|
||||||
(** [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]
|
||||||
|
|
@ -267,11 +267,11 @@ module type S = sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq_count : key Seq.t -> int t
|
val of_std_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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq_count : key sequence -> int t
|
val of_seq_count : key sequence -> 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.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a eq = 'a -> 'a -> bool
|
type 'a eq = 'a -> 'a -> bool
|
||||||
type 'a hash = 'a -> int
|
type 'a hash = 'a -> int
|
||||||
|
|
@ -64,7 +64,7 @@ module Poly : sig
|
||||||
|
|
||||||
val to_iter : ('a,'b) Hashtbl.t -> ('a * 'b) iter
|
val to_iter : ('a,'b) Hashtbl.t -> ('a * 'b) iter
|
||||||
(** Iterate on bindings in the table.
|
(** Iterate on bindings in the table.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : ('a,'b) Hashtbl.t -> ('a * 'b) sequence
|
val to_seq : ('a,'b) Hashtbl.t -> ('a * 'b) sequence
|
||||||
(** Iterate on bindings in the table.
|
(** Iterate on bindings in the table.
|
||||||
|
|
@ -78,11 +78,11 @@ module Poly : sig
|
||||||
|
|
||||||
val add_iter : ('a,'b) Hashtbl.t -> ('a * 'b) iter -> unit
|
val add_iter : ('a,'b) Hashtbl.t -> ('a * 'b) iter -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : ('a,'b) Hashtbl.t -> ('a * 'b) Seq.t -> unit
|
val add_std_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}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq : ('a,'b) Hashtbl.t -> ('a * 'b) sequence -> unit
|
val add_seq : ('a,'b) Hashtbl.t -> ('a * 'b) sequence -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
|
|
@ -92,11 +92,11 @@ module Poly : sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : ('a * 'b) Seq.t -> ('a,'b) Hashtbl.t
|
val of_std_seq : ('a * 'b) Seq.t -> ('a,'b) Hashtbl.t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : ('a * 'b) sequence -> ('a,'b) Hashtbl.t
|
val of_seq : ('a * 'b) sequence -> ('a,'b) Hashtbl.t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
|
|
@ -107,13 +107,13 @@ module Poly : sig
|
||||||
(** [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]
|
||||||
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 [i] occurs.
|
element of [i] occurs.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq_count : ('a, int) Hashtbl.t -> 'a Seq.t -> unit
|
val add_std_seq_count : ('a, int) Hashtbl.t -> 'a Seq.t -> unit
|
||||||
(** [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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq_count : ('a, int) Hashtbl.t -> 'a sequence -> unit
|
val add_seq_count : ('a, int) Hashtbl.t -> 'a sequence -> unit
|
||||||
(** [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]
|
||||||
|
|
@ -125,11 +125,11 @@ module Poly : sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq_count : 'a Seq.t -> ('a, int) Hashtbl.t
|
val of_std_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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq_count : 'a sequence -> ('a, int) Hashtbl.t
|
val of_seq_count : 'a sequence -> ('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.
|
||||||
|
|
@ -220,7 +220,7 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : 'a t -> (key * 'a) iter
|
val to_iter : 'a t -> (key * 'a) iter
|
||||||
(** Iterate on bindings in the table.
|
(** Iterate on bindings in the table.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> (key * 'a) sequence
|
val to_seq : 'a t -> (key * 'a) sequence
|
||||||
(** Iterate on values in the table.
|
(** Iterate on values in the table.
|
||||||
|
|
@ -229,11 +229,11 @@ module type S = sig
|
||||||
|
|
||||||
val add_iter : 'a t -> (key * 'a) iter -> unit
|
val add_iter : 'a t -> (key * 'a) iter -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : 'a t -> (key * 'a) Seq.t -> unit
|
val add_std_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}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq : 'a t -> (key * 'a) sequence -> unit
|
val add_seq : 'a t -> (key * 'a) sequence -> unit
|
||||||
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
|
||||||
|
|
@ -243,11 +243,11 @@ module type S = sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (key * 'a) sequence -> 'a t
|
val of_seq : (key * 'a) sequence -> 'a t
|
||||||
(** From the given bindings, added in order.
|
(** From the given bindings, added in order.
|
||||||
|
|
@ -258,13 +258,13 @@ module type S = sig
|
||||||
(** [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]
|
||||||
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 [i] occurs.
|
element of [i] occurs.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq_count : int t -> key Seq.t -> unit
|
val add_std_seq_count : int t -> key Seq.t -> unit
|
||||||
(** [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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq_count : int t -> key sequence -> unit
|
val add_seq_count : int t -> key sequence -> unit
|
||||||
(** [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]
|
||||||
|
|
@ -276,11 +276,11 @@ module type S = sig
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq_count : key Seq.t -> int t
|
val of_std_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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq_count : key sequence -> int t
|
val of_seq_count : key sequence -> 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.
|
||||||
|
|
|
||||||
|
|
@ -174,11 +174,11 @@ module type S = sig
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : t -> elt Seq.t -> t
|
val add_std_seq : t -> elt Seq.t -> t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq : t -> elt sequence -> t (** @since 0.16 *)
|
val add_seq : t -> elt sequence -> t (** @since 0.16 *)
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
|
|
@ -187,11 +187,11 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : elt iter -> t
|
val of_iter : elt iter -> t
|
||||||
(** Build a heap from a given [iter]. Complexity: [O(n log n)].
|
(** Build a heap from a given [iter]. Complexity: [O(n log n)].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : elt Seq.t -> t
|
val of_std_seq : elt Seq.t -> t
|
||||||
(** Build a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
(** Build a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : elt sequence -> t
|
val of_seq : elt sequence -> t
|
||||||
(** Build a heap from a given [sequence]. Complexity: [O(n log n)].
|
(** Build a heap from a given [sequence]. Complexity: [O(n log n)].
|
||||||
|
|
@ -200,11 +200,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : t -> elt iter
|
val to_iter : t -> elt iter
|
||||||
(** Return a [iter] of the elements of the heap.
|
(** Return a [iter] of the elements of the heap.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : t -> elt Seq.t
|
val to_std_seq : t -> elt Seq.t
|
||||||
(** Return a [Seq.t] of the elements of the heap.
|
(** Return a [Seq.t] of the elements of the heap.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : t -> elt sequence
|
val to_seq : t -> elt sequence
|
||||||
(** Return a [sequence] of the elements of the heap.
|
(** Return a [sequence] of the elements of the heap.
|
||||||
|
|
@ -213,11 +213,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter_sorted : t -> elt iter
|
val to_iter_sorted : t -> elt iter
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq_sorted : t -> elt Seq.t
|
val to_std_seq_sorted : t -> elt Seq.t
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq_sorted : t -> elt sequence
|
val to_seq_sorted : t -> elt sequence
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
@ -120,11 +120,11 @@ module type S = sig
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : t -> elt Seq.t -> t
|
val add_std_seq : t -> elt Seq.t -> t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_seq : t -> elt sequence -> t (** @since 0.16 *)
|
val add_seq : t -> elt sequence -> t (** @since 0.16 *)
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
|
|
@ -133,11 +133,11 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : elt iter -> t
|
val of_iter : elt iter -> t
|
||||||
(** Build a heap from a given [iter]. Complexity: [O(n log n)].
|
(** Build a heap from a given [iter]. Complexity: [O(n log n)].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : elt Seq.t -> t
|
val of_std_seq : elt Seq.t -> t
|
||||||
(** Build a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
(** Build a heap from a given [Seq.t]. Complexity: [O(n log n)].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : elt sequence -> t
|
val of_seq : elt sequence -> t
|
||||||
(** Build a heap from a given [sequence]. Complexity: [O(n log n)].
|
(** Build a heap from a given [sequence]. Complexity: [O(n log n)].
|
||||||
|
|
@ -146,11 +146,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : t -> elt iter
|
val to_iter : t -> elt iter
|
||||||
(** Return a [iter] of the elements of the heap.
|
(** Return a [iter] of the elements of the heap.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : t -> elt Seq.t
|
val to_std_seq : t -> elt Seq.t
|
||||||
(** Return a [Seq.t] of the elements of the heap.
|
(** Return a [Seq.t] of the elements of the heap.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : t -> elt sequence
|
val to_seq : t -> elt sequence
|
||||||
(** Return a [sequence] of the elements of the heap.
|
(** Return a [sequence] of the elements of the heap.
|
||||||
|
|
@ -159,11 +159,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter_sorted : t -> elt iter
|
val to_iter_sorted : t -> elt iter
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq_sorted : t -> elt Seq.t
|
val to_std_seq_sorted : t -> elt Seq.t
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq_sorted : t -> elt sequence
|
val to_seq_sorted : t -> elt sequence
|
||||||
(** Iterate on the elements, in increasing order.
|
(** Iterate on the elements, in increasing order.
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
@ -76,12 +76,12 @@ val fold_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
|
||||||
val fold_map_i : ('acc -> int -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
|
val fold_map_i : ('acc -> int -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_map_i f init l] is a [foldi]-like function, but it also maps the
|
(** [fold_map_i f init l] is a [foldi]-like function, but it also maps the
|
||||||
list to another list.
|
list to another list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val fold_on_map : f:('a -> 'b) -> reduce:('acc -> 'b -> 'acc) -> 'acc -> 'a list -> 'acc
|
val fold_on_map : f:('a -> 'b) -> reduce:('acc -> 'b -> 'acc) -> 'acc -> 'a list -> 'acc
|
||||||
(** [fold_on_map ~f ~reduce init l] combines [map f] and [fold_left reduce init]
|
(** [fold_on_map ~f ~reduce init l] combines [map f] and [fold_left reduce init]
|
||||||
in one operation.
|
in one operation.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list
|
val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list
|
||||||
(** [scan_left f init l] returns the list [[init; f init x0; f (f init x0) x1; ...]]
|
(** [scan_left f init l] returns the list [[init; f init x0; f (f init x0) x1; ...]]
|
||||||
|
|
@ -102,7 +102,7 @@ val fold_filter_map : ('acc -> 'a -> 'acc * 'b option) -> 'acc -> 'a list -> 'ac
|
||||||
val fold_filter_map_i : ('acc -> int -> 'a -> 'acc * 'b option) -> 'acc -> 'a list -> 'acc * 'b list
|
val fold_filter_map_i : ('acc -> int -> 'a -> 'acc * 'b option) -> 'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_filter_map_i f init l] is a [foldi]-like function, but also
|
(** [fold_filter_map_i f init l] is a [foldi]-like function, but also
|
||||||
generates a list of output in a way similar to {!filter_map}.
|
generates a list of output in a way similar to {!filter_map}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val fold_flat_map : ('acc -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc * 'b list
|
val fold_flat_map : ('acc -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_flat_map f acc l] is a [fold_left]-like function, but it also maps the
|
(** [fold_flat_map f acc l] is a [fold_left]-like function, but it also maps the
|
||||||
|
|
@ -112,7 +112,7 @@ val fold_flat_map : ('acc -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc *
|
||||||
val fold_flat_map_i : ('acc -> int -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc * 'b list
|
val fold_flat_map_i : ('acc -> int -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_flat_map_i f acc l] is a [fold_left]-like function, but it also maps the
|
(** [fold_flat_map_i f acc l] is a [fold_left]-like function, but it also maps the
|
||||||
list to a list of lists that is then [flatten]'d.
|
list to a list of lists that is then [flatten]'d.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val count : ('a -> bool) -> 'a list -> int
|
val count : ('a -> bool) -> 'a list -> int
|
||||||
(** [count p l] counts how many elements of [l] satisfy predicate [p].
|
(** [count p l] counts how many elements of [l] satisfy predicate [p].
|
||||||
|
|
@ -173,7 +173,7 @@ val flat_map : ('a -> 'b t) -> 'a t -> 'b t
|
||||||
val flat_map_i : (int -> 'a -> 'b t) -> 'a t -> 'b t
|
val flat_map_i : (int -> 'a -> 'b t) -> 'a t -> 'b t
|
||||||
(** Map with index and flatten at the same time (safe).
|
(** Map with index and flatten at the same time (safe).
|
||||||
Evaluation order is not guaranteed.
|
Evaluation order is not guaranteed.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val flatten : 'a t t -> 'a t
|
val flatten : 'a t t -> 'a t
|
||||||
|
|
@ -725,11 +725,11 @@ val to_string : ?start:string -> ?stop:string -> ?sep:string ->
|
||||||
|
|
||||||
val to_iter : 'a t -> 'a iter
|
val to_iter : 'a t -> 'a iter
|
||||||
(** Return a [iter] of the elements of the list.
|
(** Return a [iter] of the elements of the list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** Return a [Seq.t] of the elements of the list.
|
(** Return a [Seq.t] of the elements of the list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
(** Return a [sequence] of the elements of the list.
|
(** Return a [sequence] of the elements of the list.
|
||||||
|
|
@ -739,16 +739,16 @@ val to_seq : 'a t -> 'a sequence
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** Build a list from a given [iter].
|
(** Build a list from a given [iter].
|
||||||
In the result, elements appear in the same order as they did in the source [iter].
|
In the result, elements appear in the same order as they did in the source [iter].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq_rev : 'a Seq.t -> 'a t
|
val of_std_seq_rev : 'a Seq.t -> 'a t
|
||||||
(** Build a list from a given [Seq.t], in reverse order.
|
(** Build a list from a given [Seq.t], in reverse order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : 'a Seq.t -> 'a t
|
val of_std_seq : 'a Seq.t -> 'a t
|
||||||
(** Build a list from a given [Seq.t].
|
(** Build a list from a given [Seq.t].
|
||||||
In the result, elements appear in the same order as they did in the source [seq].
|
In the result, elements appear in the same order as they did in the source [seq].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : 'a sequence -> 'a t
|
val of_seq : 'a sequence -> 'a t
|
||||||
(** Build a list from a given [sequence].
|
(** Build a list from a given [sequence].
|
||||||
|
|
@ -800,12 +800,12 @@ module Infix : sig
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
||||||
|
|
||||||
(** {2 IO} *)
|
(** {2 IO} *)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
@ -76,12 +76,12 @@ val fold_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> 'acc * 'b
|
||||||
val fold_map_i : f:('acc -> int -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> 'acc * 'b list
|
val fold_map_i : f:('acc -> int -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_map_i f init l] is a [foldi]-like function, but it also maps the
|
(** [fold_map_i f init l] is a [foldi]-like function, but it also maps the
|
||||||
list to another list.
|
list to another list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val fold_on_map : f:('a -> 'b) -> reduce:('acc -> 'b -> 'acc) -> init:'acc -> 'a list -> 'acc
|
val fold_on_map : f:('a -> 'b) -> reduce:('acc -> 'b -> 'acc) -> init:'acc -> 'a list -> 'acc
|
||||||
(** [fold_on_map ~f ~reduce init l] combines [map f] and [fold_left reduce init]
|
(** [fold_on_map ~f ~reduce init l] combines [map f] and [fold_left reduce init]
|
||||||
in one operation.
|
in one operation.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list
|
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list
|
||||||
(** [scan_left ~f ~init l] returns the list [[init; f init x0; f (f init x0) x1; ...]]
|
(** [scan_left ~f ~init l] returns the list [[init; f init x0; f (f init x0) x1; ...]]
|
||||||
|
|
@ -102,7 +102,7 @@ val fold_filter_map : f:('acc -> 'a -> 'acc * 'b option) -> init:'acc -> 'a list
|
||||||
val fold_filter_map_i : f:('acc -> int -> 'a -> 'acc * 'b option) -> init:'acc -> 'a list -> 'acc * 'b list
|
val fold_filter_map_i : f:('acc -> int -> 'a -> 'acc * 'b option) -> init:'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_filter_map_i f init l] is a [foldi]-like function, but also
|
(** [fold_filter_map_i f init l] is a [foldi]-like function, but also
|
||||||
generates a list of output in a way similar to {!filter_map}.
|
generates a list of output in a way similar to {!filter_map}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val fold_flat_map : f:('acc -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list -> 'acc * 'b list
|
val fold_flat_map : f:('acc -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_flat_map f acc l] is a [fold_left]-like function, but it also maps the
|
(** [fold_flat_map f acc l] is a [fold_left]-like function, but it also maps the
|
||||||
|
|
@ -112,7 +112,7 @@ val fold_flat_map : f:('acc -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list ->
|
||||||
val fold_flat_map_i : f:('acc -> int -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list -> 'acc * 'b list
|
val fold_flat_map_i : f:('acc -> int -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list -> 'acc * 'b list
|
||||||
(** [fold_flat_map_i f acc l] is a [fold_left]-like function, but it also maps the
|
(** [fold_flat_map_i f acc l] is a [fold_left]-like function, but it also maps the
|
||||||
list to a list of lists that is then [flatten]'d.
|
list to a list of lists that is then [flatten]'d.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val count : f:('a -> bool) -> 'a list -> int
|
val count : f:('a -> bool) -> 'a list -> int
|
||||||
(** [count p l] counts how many elements of [l] satisfy predicate [p].
|
(** [count p l] counts how many elements of [l] satisfy predicate [p].
|
||||||
|
|
@ -173,7 +173,7 @@ val flat_map : f:('a -> 'b t) -> 'a t -> 'b t
|
||||||
val flat_map_i : f:(int -> 'a -> 'b t) -> 'a t -> 'b t
|
val flat_map_i : f:(int -> 'a -> 'b t) -> 'a t -> 'b t
|
||||||
(** Map with index and flatten at the same time (safe).
|
(** Map with index and flatten at the same time (safe).
|
||||||
Evaluation order is not guaranteed.
|
Evaluation order is not guaranteed.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val flatten : 'a t t -> 'a t
|
val flatten : 'a t t -> 'a t
|
||||||
|
|
@ -725,11 +725,11 @@ val to_string : ?start:string -> ?stop:string -> ?sep:string ->
|
||||||
|
|
||||||
val to_iter : 'a t -> 'a iter
|
val to_iter : 'a t -> 'a iter
|
||||||
(** Return a [iter] of the elements of the list.
|
(** Return a [iter] of the elements of the list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** Return a [Seq.t] of the elements of the list.
|
(** Return a [Seq.t] of the elements of the list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
(** Return a [sequence] of the elements of the list.
|
(** Return a [sequence] of the elements of the list.
|
||||||
|
|
@ -739,16 +739,16 @@ val to_seq : 'a t -> 'a sequence
|
||||||
val of_iter : 'a iter -> 'a t
|
val of_iter : 'a iter -> 'a t
|
||||||
(** Build a list from a given [iter].
|
(** Build a list from a given [iter].
|
||||||
In the result, elements appear in the same order as they did in the source [iter].
|
In the result, elements appear in the same order as they did in the source [iter].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq_rev : 'a Seq.t -> 'a t
|
val of_std_seq_rev : 'a Seq.t -> 'a t
|
||||||
(** Build a list from a given [Seq.t], in reverse order.
|
(** Build a list from a given [Seq.t], in reverse order.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : 'a Seq.t -> 'a t
|
val of_std_seq : 'a Seq.t -> 'a t
|
||||||
(** Build a list from a given [Seq.t].
|
(** Build a list from a given [Seq.t].
|
||||||
In the result, elements appear in the same order as they did in the source [seq].
|
In the result, elements appear in the same order as they did in the source [seq].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : 'a sequence -> 'a t
|
val of_seq : 'a sequence -> 'a t
|
||||||
(** Build a list from a given [sequence].
|
(** Build a list from a given [sequence].
|
||||||
|
|
@ -800,12 +800,12 @@ module Infix : sig
|
||||||
@since 0.17 *)
|
@since 0.17 *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
include CCShimsMkLet_.S with type 'a t_let := 'a list
|
||||||
|
|
||||||
(** {2 IO} *)
|
(** {2 IO} *)
|
||||||
|
|
|
||||||
|
|
@ -64,27 +64,27 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : (key * 'a) iter -> 'a t
|
val of_iter : (key * 'a) iter -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
val add_std_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_iter : (key * 'a) iter -> 'a t
|
val of_iter : (key * 'a) iter -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> (key * 'a) iter
|
val to_iter : 'a t -> (key * 'a) iter
|
||||||
(** Like {!to_list}.
|
(** Like {!to_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (key * 'a) sequence -> 'a t
|
val of_seq : (key * 'a) sequence -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
|
|
||||||
|
|
@ -75,27 +75,27 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : (key * 'a) iter -> 'a t
|
val of_iter : (key * 'a) iter -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_std_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
val add_std_seq : 'a t -> (key * 'a) Seq.t -> 'a t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
val of_std_seq : (key * 'a) Seq.t -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
val add_iter : 'a t -> (key * 'a) iter -> 'a t
|
||||||
(** Like {!add_list}.
|
(** Like {!add_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_iter : (key * 'a) iter -> 'a t
|
val of_iter : (key * 'a) iter -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> (key * 'a) iter
|
val to_iter : 'a t -> (key * 'a) iter
|
||||||
(** Like {!to_list}.
|
(** Like {!to_list}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (key * 'a) sequence -> 'a t
|
val of_seq : (key * 'a) sequence -> 'a t
|
||||||
(** Like {!of_list}.
|
(** Like {!of_list}.
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ val get_or : default:'a -> 'a t -> 'a
|
||||||
|
|
||||||
val value : 'a t -> default:'a -> 'a
|
val value : 'a t -> default:'a -> 'a
|
||||||
(** Similar to the stdlib's [Option.value] and to {!get_or}.
|
(** Similar to the stdlib's [Option.value] and to {!get_or}.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val get_exn : 'a t -> 'a
|
val get_exn : 'a t -> 'a
|
||||||
(** Open the option, possibly failing if it is [None].
|
(** Open the option, possibly failing if it is [None].
|
||||||
|
|
@ -155,14 +155,14 @@ module Infix : sig
|
||||||
(** [a <+> b] is [a] if [a] is [Some _], [b] otherwise. *)
|
(** [a <+> b] is [a] if [a] is [Some _], [b] otherwise. *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a option
|
include CCShimsMkLet_.S with type 'a t_let := 'a option
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a option
|
include CCShimsMkLet_.S with type 'a t_let := 'a option
|
||||||
|
|
||||||
(** {2 Conversion and IO} *)
|
(** {2 Conversion and IO} *)
|
||||||
|
|
@ -197,11 +197,11 @@ val to_gen : 'a t -> 'a gen
|
||||||
|
|
||||||
val to_std_seq : 'a t -> 'a Seq.t
|
val to_std_seq : 'a t -> 'a Seq.t
|
||||||
(** Same as {!Stdlib.Option.to_seq}
|
(** Same as {!Stdlib.Option.to_seq}
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> 'a sequence
|
val to_iter : 'a t -> 'a sequence
|
||||||
(** Returns an internal iterator, like in the library [Iter].
|
(** Returns an internal iterator, like in the library [Iter].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : 'a t -> 'a sequence
|
val to_seq : 'a t -> 'a sequence
|
||||||
(** Previous name for {!to_iter}
|
(** Previous name for {!to_iter}
|
||||||
|
|
|
||||||
|
|
@ -325,5 +325,5 @@ module U : sig
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ val pure : 'a -> 'a t
|
||||||
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
||||||
|
|
||||||
(** {4 Run a generator} *)
|
(** {4 Run a generator} *)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a equal = 'a -> 'a -> bool
|
type 'a equal = 'a -> 'a -> bool
|
||||||
type 'a ord = 'a -> 'a -> int
|
type 'a ord = 'a -> 'a -> int
|
||||||
|
|
@ -193,12 +193,12 @@ module Infix : sig
|
||||||
over the error of [b] if both fail. *)
|
over the error of [b] if both fail. *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result
|
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result
|
||||||
end
|
end
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result
|
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -259,10 +259,10 @@ val of_opt : 'a option -> ('a, string) t
|
||||||
(** Convert an option to a result. *)
|
(** Convert an option to a result. *)
|
||||||
|
|
||||||
val to_iter : ('a, _) t -> 'a iter
|
val to_iter : ('a, _) t -> 'a iter
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : ('a, _) t -> 'a Seq.t
|
val to_std_seq : ('a, _) t -> 'a Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val to_seq : ('a, _) t -> 'a sequence
|
val to_seq : ('a, _) t -> 'a sequence
|
||||||
(** @deprecated use {!to_iter} or {!to_std_seq} *)
|
(** @deprecated use {!to_iter} or {!to_std_seq} *)
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,14 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : elt iter -> t
|
val of_iter : elt iter -> t
|
||||||
(** Build a set from the given [iter] of elements.
|
(** Build a set from the given [iter] of elements.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : elt sequence -> t
|
val of_seq : elt sequence -> t
|
||||||
(** Build a set from the given [sequence] of elements.
|
(** Build a set from the given [sequence] of elements.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
|
|
||||||
|
|
@ -56,14 +56,14 @@ module type S = sig
|
||||||
|
|
||||||
val of_iter : elt iter -> t
|
val of_iter : elt iter -> t
|
||||||
(** Build a set from the given [iter] of elements.
|
(** Build a set from the given [iter] of elements.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val add_iter : t -> elt iter -> t
|
val add_iter : t -> elt iter -> t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : elt sequence -> t
|
val of_seq : elt sequence -> t
|
||||||
(** Build a set from the given [sequence] of elements.
|
(** Build a set from the given [sequence] of elements.
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : t -> char iter
|
val to_iter : t -> char iter
|
||||||
(** Return the [iter] of characters contained in the string.
|
(** Return the [iter] of characters contained in the string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : t -> char Seq.t
|
val to_std_seq : t -> char Seq.t
|
||||||
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : t -> char sequence
|
val to_seq : t -> char sequence
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
@ -49,11 +49,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : t -> char iter
|
val to_iter : t -> char iter
|
||||||
(** Return the [iter] of characters contained in the string.
|
(** Return the [iter] of characters contained in the string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : t -> char Seq.t
|
val to_std_seq : t -> char Seq.t
|
||||||
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : t -> char sequence
|
val to_seq : t -> char sequence
|
||||||
|
|
@ -117,11 +117,11 @@ val of_gen : char gen -> string
|
||||||
|
|
||||||
val of_iter : char iter -> string
|
val of_iter : char iter -> string
|
||||||
(** Convert a [iter] of characters to a string.
|
(** Convert a [iter] of characters to a string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : char Seq.t -> string
|
val of_std_seq : char Seq.t -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : char sequence -> string
|
val of_seq : char sequence -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
|
|
@ -413,10 +413,10 @@ module Split : sig
|
||||||
val gen : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) gen
|
val gen : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) gen
|
||||||
|
|
||||||
val iter : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
val iter : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val std_seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
val std_seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
||||||
(** deprecated, use {!iter} instead *)
|
(** deprecated, use {!iter} instead *)
|
||||||
|
|
@ -436,10 +436,10 @@ module Split : sig
|
||||||
val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen
|
val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen
|
||||||
|
|
||||||
val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val std_seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
val std_seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
||||||
(** deprecated, use {!iter_cpy} instead *)
|
(** deprecated, use {!iter_cpy} instead *)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
@ -46,11 +46,11 @@ module type S = sig
|
||||||
|
|
||||||
val to_iter : t -> char iter
|
val to_iter : t -> char iter
|
||||||
(** Return the [iter] of characters contained in the string.
|
(** Return the [iter] of characters contained in the string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_std_seq : t -> char Seq.t
|
val to_std_seq : t -> char Seq.t
|
||||||
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
(** [to_std_seq s] returns a [Seq.t] of the bytes in [s].
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : t -> char sequence
|
val to_seq : t -> char sequence
|
||||||
|
|
@ -114,11 +114,11 @@ val of_gen : char gen -> string
|
||||||
|
|
||||||
val of_iter : char iter -> string
|
val of_iter : char iter -> string
|
||||||
(** Convert a [iter] of characters to a string.
|
(** Convert a [iter] of characters to a string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_std_seq : char Seq.t -> string
|
val of_std_seq : char Seq.t -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : char sequence -> string
|
val of_seq : char sequence -> string
|
||||||
(** Convert a [sequence] of characters to a string.
|
(** Convert a [sequence] of characters to a string.
|
||||||
|
|
@ -410,10 +410,10 @@ module Split : sig
|
||||||
val gen : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) gen
|
val gen : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) gen
|
||||||
|
|
||||||
val iter : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
val iter : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val std_seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
val std_seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
val seq : ?drop:drop_if_empty -> by:string -> string -> (string*int*int) sequence
|
||||||
(** deprecated, use {!iter} instead *)
|
(** deprecated, use {!iter} instead *)
|
||||||
|
|
@ -433,10 +433,10 @@ module Split : sig
|
||||||
val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen
|
val gen_cpy : ?drop:drop_if_empty -> by:string -> string -> string gen
|
||||||
|
|
||||||
val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
val iter_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val std_seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
val std_seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Seq.t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string sequence
|
||||||
(** deprecated, use {!iter_cpy} instead *)
|
(** deprecated, use {!iter_cpy} instead *)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
|
|
||||||
type t = private string
|
type t = private string
|
||||||
|
|
@ -52,7 +52,7 @@ val to_gen : ?idx:int -> t -> uchar gen
|
||||||
val to_iter : ?idx:int -> t -> uchar iter
|
val to_iter : ?idx:int -> t -> uchar iter
|
||||||
(** Iterator of unicode codepoints.
|
(** Iterator of unicode codepoints.
|
||||||
@param idx offset where to start the decoding.
|
@param idx offset where to start the decoding.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val to_seq : ?idx:int -> t -> uchar sequence
|
val to_seq : ?idx:int -> t -> uchar sequence
|
||||||
(** Iter of unicode codepoints.
|
(** Iter of unicode codepoints.
|
||||||
|
|
@ -63,7 +63,7 @@ val to_seq : ?idx:int -> t -> uchar sequence
|
||||||
val to_std_seq : ?idx:int -> t -> uchar Seq.t
|
val to_std_seq : ?idx:int -> t -> uchar Seq.t
|
||||||
(** Iter of unicode codepoints.
|
(** Iter of unicode codepoints.
|
||||||
@param idx offset where to start the decoding.
|
@param idx offset where to start the decoding.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_list : ?idx:int -> t -> uchar list
|
val to_list : ?idx:int -> t -> uchar list
|
||||||
|
|
@ -92,11 +92,11 @@ val concat : t -> t list -> t
|
||||||
|
|
||||||
val of_std_seq : uchar Seq.t -> t
|
val of_std_seq : uchar Seq.t -> t
|
||||||
(** Build a string from unicode codepoints
|
(** Build a string from unicode codepoints
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_iter : uchar sequence -> t
|
val of_iter : uchar sequence -> t
|
||||||
(** Build a string from unicode codepoints
|
(** Build a string from unicode codepoints
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val of_seq : uchar sequence -> t
|
val of_seq : uchar sequence -> t
|
||||||
(** @deprecated use {!of_seq} or {!of_std_seq} instead *)
|
(** @deprecated use {!of_seq} or {!of_std_seq} instead *)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
type 'a gen = unit -> 'a option
|
type 'a gen = unit -> 'a option
|
||||||
|
|
@ -61,7 +61,7 @@ val clear : ('a, rw) t -> unit
|
||||||
val clear_and_reset : ('a, rw) t -> unit
|
val clear_and_reset : ('a, rw) t -> unit
|
||||||
(** Clear the content of the vector, and deallocate the underlying array,
|
(** Clear the content of the vector, and deallocate the underlying array,
|
||||||
removing references to all the elements.
|
removing references to all the elements.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val ensure_with : init:'a -> ('a, rw) t -> int -> unit
|
val ensure_with : init:'a -> ('a, rw) t -> int -> unit
|
||||||
(** Hint to the vector that it should have at least the given capacity.
|
(** Hint to the vector that it should have at least the given capacity.
|
||||||
|
|
@ -88,11 +88,11 @@ val append_array : ('a, rw) t -> 'a array -> unit
|
||||||
|
|
||||||
val append_iter : ('a, rw) t -> 'a iter -> unit
|
val append_iter : ('a, rw) t -> 'a iter -> unit
|
||||||
(** Append content of iterator.
|
(** Append content of iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val append_std_seq : ('a, rw) t -> 'a Seq.t -> unit
|
val append_std_seq : ('a, rw) t -> 'a Seq.t -> unit
|
||||||
(** Append content of iterator.
|
(** Append content of iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val append_seq : ('a, rw) t -> 'a sequence -> unit
|
val append_seq : ('a, rw) t -> 'a sequence -> unit
|
||||||
(** Append content of sequence. *)
|
(** Append content of sequence. *)
|
||||||
|
|
@ -138,7 +138,7 @@ val shrink : ('a, rw) t -> int -> unit
|
||||||
|
|
||||||
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
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val member : eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool
|
val member : eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool
|
||||||
(** Is the element a member of the vector? *)
|
(** Is the element a member of the vector? *)
|
||||||
|
|
@ -169,7 +169,7 @@ val map : ('a -> 'b) -> ('a,_) t -> ('b, 'mut) t
|
||||||
val mapi : (int -> 'a -> 'b) -> ('a,_) t -> ('b, 'mut) t
|
val mapi : (int -> 'a -> 'b) -> ('a,_) t -> ('b, 'mut) t
|
||||||
(** [map f v] is just like {!map}, but it also passes in the index
|
(** [map f v] is just like {!map}, but it also passes in the index
|
||||||
of each element as the first argument to the function [f].
|
of each element as the first argument to the function [f].
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val map_in_place : ('a -> 'a) -> ('a,_) t -> unit
|
val map_in_place : ('a -> 'a) -> ('a,_) t -> unit
|
||||||
(** Map elements of the vector in place
|
(** Map elements of the vector in place
|
||||||
|
|
@ -215,11 +215,11 @@ val flat_map : ('a -> ('b,_) t) -> ('a,_) t -> ('b, 'mut) t
|
||||||
|
|
||||||
val flat_map_iter : ('a -> 'b sequence) -> ('a,_) t -> ('b, 'mut) t
|
val flat_map_iter : ('a -> 'b sequence) -> ('a,_) t -> ('b, 'mut) t
|
||||||
(** Like {!flat_map}, but using {!iter} for intermediate collections.
|
(** Like {!flat_map}, but using {!iter} for intermediate collections.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val flat_map_std_seq : ('a -> 'b Seq.t) -> ('a,_) t -> ('b, 'mut) t
|
val flat_map_std_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.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val flat_map_seq : ('a -> 'b sequence) -> ('a,_) t -> ('b, 'mut) t
|
val flat_map_seq : ('a -> 'b sequence) -> ('a,_) t -> ('b, 'mut) t
|
||||||
(** Like {!flat_map}, but using {!sequence} for
|
(** Like {!flat_map}, but using {!sequence} for
|
||||||
|
|
@ -235,7 +235,7 @@ val flat_map_list : ('a -> 'b list) -> ('a,_) t -> ('b, 'mut) t
|
||||||
|
|
||||||
val monoid_product : ('a -> 'b -> 'c) -> ('a,_) t -> ('b,_) t -> ('c,_) t
|
val monoid_product : ('a -> 'b -> 'c) -> ('a,_) t -> ('b,_) t -> ('c,_) t
|
||||||
(** All combinaisons of tuples from the two vectors are passed to the function.
|
(** All combinaisons of tuples from the two vectors are passed to the function.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val (>>=) : ('a,_) t -> ('a -> ('b,_) t) -> ('b, 'mut) t
|
val (>>=) : ('a,_) t -> ('a -> ('b,_) t) -> ('b, 'mut) t
|
||||||
(** Infix version of {!flat_map}. *)
|
(** Infix version of {!flat_map}. *)
|
||||||
|
|
@ -313,24 +313,24 @@ val of_std_seq : ?init:('a,rw) t -> 'a Seq.t -> ('a, rw) t
|
||||||
|
|
||||||
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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_iter_rev : ('a,_) t -> 'a iter
|
val to_iter_rev : ('a,_) t -> 'a iter
|
||||||
(** [to_iter_rev v] returns the sequence of elements of [v] in reverse order,
|
(** [to_iter_rev 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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_std_seq : ('a,_) t -> 'a Seq.t
|
val to_std_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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_std_seq_rev : ('a,_) t -> 'a Seq.t
|
val to_std_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.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
val to_seq : ('a,_) t -> 'a sequence
|
val to_seq : ('a,_) t -> 'a sequence
|
||||||
|
|
@ -375,5 +375,5 @@ val pp : ?start:string -> ?stop:string -> ?sep:string ->
|
||||||
'a printer -> ('a,_) t printer
|
'a printer -> ('a,_) t printer
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) t
|
include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) t
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** A sequence of items of type ['a], possibly infinite
|
(** A sequence of items of type ['a], possibly infinite
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a iter_once = 'a iter
|
type 'a iter_once = 'a iter
|
||||||
(** Iter that should be used only once
|
(** Iter that should be used only once
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a sequence = ('a -> unit) -> unit
|
type 'a sequence = ('a -> unit) -> unit
|
||||||
(** A sequence of items of type ['a], possibly infinite
|
(** A sequence of items of type ['a], possibly infinite
|
||||||
|
|
@ -699,13 +699,13 @@ module type MAP = sig
|
||||||
val to_list : 'a t -> (vertex * 'a * vertex) list
|
val to_list : 'a t -> (vertex * 'a * vertex) list
|
||||||
|
|
||||||
val of_iter : (vertex * 'a * vertex) iter -> 'a t
|
val of_iter : (vertex * 'a * vertex) iter -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
|
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> (vertex * 'a * vertex) iter
|
val to_iter : 'a t -> (vertex * 'a * vertex) iter
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (vertex * 'a * vertex) iter -> 'a t
|
val of_seq : (vertex * 'a * vertex) iter -> 'a t
|
||||||
(** @deprecated use {!of_iter} instead *)
|
(** @deprecated use {!of_iter} instead *)
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** A sequence of items of type ['a], possibly infinite
|
(** A sequence of items of type ['a], possibly infinite
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a iter_once = 'a iter
|
type 'a iter_once = 'a iter
|
||||||
(** Iter that should be used only once
|
(** Iter that should be used only once
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a sequence = ('a -> unit) -> unit
|
type 'a sequence = ('a -> unit) -> unit
|
||||||
(** A sequence of items of type ['a], possibly infinite
|
(** A sequence of items of type ['a], possibly infinite
|
||||||
|
|
@ -347,7 +347,7 @@ module Dot : sig
|
||||||
'v iter ->
|
'v iter ->
|
||||||
unit
|
unit
|
||||||
(** Same as {!pp} but starting from several vertices, not just one.
|
(** Same as {!pp} but starting from several vertices, not just one.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val pp_seq : tbl:('v,vertex_state) table ->
|
val pp_seq : tbl:('v,vertex_state) table ->
|
||||||
eq:('v -> 'v -> bool) ->
|
eq:('v -> 'v -> bool) ->
|
||||||
|
|
@ -420,13 +420,13 @@ module type MAP = sig
|
||||||
val to_list : 'a t -> (vertex * 'a * vertex) list
|
val to_list : 'a t -> (vertex * 'a * vertex) list
|
||||||
|
|
||||||
val of_iter : (vertex * 'a * vertex) iter -> 'a t
|
val of_iter : (vertex * 'a * vertex) iter -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
|
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val to_iter : 'a t -> (vertex * 'a * vertex) iter
|
val to_iter : 'a t -> (vertex * 'a * vertex) iter
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 2.8 *)
|
||||||
|
|
||||||
val of_seq : (vertex * 'a * vertex) iter -> 'a t
|
val of_seq : (vertex * 'a * vertex) iter -> 'a t
|
||||||
(** @deprecated use {!of_iter} instead *)
|
(** @deprecated use {!of_iter} instead *)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ type 'a sequence = ('a -> unit) -> unit
|
||||||
|
|
||||||
type 'a iter = ('a -> unit) -> unit
|
type 'a iter = ('a -> unit) -> unit
|
||||||
(** Fast internal iterator.
|
(** Fast internal iterator.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,11 @@ module type S = sig
|
||||||
|
|
||||||
val atom : string -> t
|
val atom : string -> t
|
||||||
(** Make an atom out of this string.
|
(** Make an atom out of this string.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val list : t list -> t
|
val list : t list -> t
|
||||||
(** Make a Sexpr of this list.
|
(** Make a Sexpr of this list.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
(** {2 Constructors} *)
|
(** {2 Constructors} *)
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ module type S = sig
|
||||||
|
|
||||||
val to_list : t -> sexp list or_error
|
val to_list : t -> sexp list or_error
|
||||||
(** Read all the values from this decoder.
|
(** Read all the values from this decoder.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
end
|
end
|
||||||
|
|
||||||
val parse_string : string -> t or_error
|
val parse_string : string -> t or_error
|
||||||
|
|
@ -114,7 +114,7 @@ module type S = sig
|
||||||
|
|
||||||
val parse_string_list : string -> t list or_error
|
val parse_string_list : string -> t list or_error
|
||||||
(** Parse a string into a list of S-exprs.
|
(** Parse a string into a list of S-exprs.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val parse_chan : in_channel -> t or_error
|
val parse_chan : in_channel -> t or_error
|
||||||
(** Parse a S-expression from the given channel. Can read more data than
|
(** Parse a S-expression from the given channel. Can read more data than
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ module Make(P : PARAM) : sig
|
||||||
|
|
||||||
val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
|
||||||
(** Cartesian product of the content of these futures.
|
(** Cartesian product of the content of these futures.
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
|
|
||||||
val app : ('a -> 'b) t -> 'a t -> 'b t
|
val app : ('a -> 'b) t -> 'a t -> 'b t
|
||||||
(** [app f x] applies the result of [f] to the result of [x]. *)
|
(** [app f x] applies the result of [f] to the result of [x]. *)
|
||||||
|
|
@ -155,7 +155,7 @@ module Make(P : PARAM) : sig
|
||||||
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -170,7 +170,7 @@ module Make(P : PARAM) : sig
|
||||||
(** Alias to {!app}. *)
|
(** Alias to {!app}. *)
|
||||||
|
|
||||||
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
(** Let operators on OCaml >= 4.08.0, nothing otherwise
|
||||||
@since NEXT_RELEASE *)
|
@since 2.8 *)
|
||||||
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
include CCShimsMkLet_.S with type 'a t_let := 'a t
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ val ensure_session_leader : unit -> unit
|
||||||
time as the current process. Does nothing on windows.
|
time as the current process. Does nothing on windows.
|
||||||
Idempotent: it can be called several times but will only have effects,
|
Idempotent: it can be called several times but will only have effects,
|
||||||
if any, the first time.
|
if any, the first time.
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(** {2 Networking} *)
|
(** {2 Networking} *)
|
||||||
|
|
@ -196,5 +196,5 @@ val with_temp_dir :
|
||||||
Note that this is implemented following the discussion at:
|
Note that this is implemented following the discussion at:
|
||||||
https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/
|
https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 2.8
|
||||||
*)
|
*)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue