diff --git a/dev/containers/CCByte_buffer/index.html b/dev/containers/CCByte_buffer/index.html index e8452cac..d790ea70 100644 --- a/dev/containers/CCByte_buffer/index.html +++ b/dev/containers/CCByte_buffer/index.html @@ -1,2 +1,2 @@ -
CCByte_bufferByte buffer.
A dynamic vector of bytes.
val create : ?cap:int -> unit -> tCreate a new buffer with given initial capacity.
val length : t -> intCurrent length.
val is_empty : t -> boolis_empty b is length b=0
val bytes : t -> bytesAccess the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).
val clear : t -> unitval ensure_cap : t -> int -> unitensure_cap self n ensures that capacity self >= n.
val shrink_to : t -> int -> unitshrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.
val add_char : t -> char -> unitPush a character at the end.
val append_bytes : t -> bytes -> unitval append_subbytes : t -> bytes -> int -> int -> unitval append_string : t -> string -> unitval append_substring : t -> string -> int -> int -> unitval append_buf : t -> Stdlib.Buffer.t -> unitval append_seq : t -> char Stdlib.Seq.t -> unitval get : t -> int -> charval unsafe_get : t -> int -> charval set : t -> int -> char -> unitval unsafe_set : t -> int -> char -> unitval contents : t -> stringCopy the internal data to a string
val contents_bytes : t -> bytesCopy the internal data to a byte buffer
val iter : ( char -> unit ) -> t -> unitval fold_left : ( 'a -> char -> 'a ) -> 'a -> t -> 'aval of_seq : char Stdlib.Seq.t -> tval to_seq : t -> char Stdlib.Seq.tCCByte_bufferByte buffer.
A dynamic vector of bytes.
val create : ?cap:int -> unit -> tCreate a new buffer with given initial capacity.
val length : t -> intCurrent length.
val is_empty : t -> boolis_empty b is length b=0
val bytes : t -> bytesAccess the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).
val clear : t -> unitval ensure_cap : t -> int -> unitensure_cap self n ensures that capacity self >= n.
val shrink_to : t -> int -> unitshrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.
val add_char : t -> char -> unitPush a character at the end.
val append_bytes : t -> bytes -> unitval append_subbytes : t -> bytes -> int -> int -> unitval append_string : t -> string -> unitval append_substring : t -> string -> int -> int -> unitval append_buf : t -> Stdlib.Buffer.t -> unitval append_seq : t -> char Stdlib.Seq.t -> unitval get : t -> int -> charval unsafe_get : t -> int -> charval set : t -> int -> char -> unitval unsafe_set : t -> int -> char -> unitval contents : t -> stringCopy the internal data to a string
val contents_bytes : t -> bytesCopy the internal data to a byte buffer
val iter : ( char -> unit ) -> t -> unitval fold_left : ( 'a -> char -> 'a ) -> 'a -> t -> 'aval of_seq : char Stdlib.Seq.t -> tval to_seq : t -> char Stdlib.Seq.tAvailable only on OCaml >= 4.08.
val with_styling : ANSI_codes.style list -> t -> ( unit -> 'a ) -> 'awith_styling style fmt f sets the given style on fmt, calls f(), then restores the previous style. It is useful in imperative-style printers (a sequence of "print a; print b; …").
Available only on OCaml >= 4.08.
val to_string : 'a printer -> 'a -> stringval of_chan : Stdlib.out_channel -> tAlias to Format.formatter_of_out_channel.
val with_out_chan : Stdlib.out_channel -> ( t -> 'a ) -> 'awith_out_chan oc f turns oc into a formatter fmt, and call f fmt. Behaves like f fmt from then on, but whether the call to f fails or returns, fmt is flushed before the call terminates.
val stdout : tval stderr : tval sprintf : ( 'a, t, unit, string ) Stdlib.format4 -> 'aPrint into a string any format string that would usually be compatible with fprintf. Like Format.asprintf.
val sprintf_no_color : ( 'a, t, unit, string ) Stdlib.format4 -> 'aLike sprintf but never prints colors.
val with_styling : ANSI_codes.style list -> t -> ( unit -> 'a ) -> 'awith_styling style fmt f sets the given style on fmt, calls f(), then restores the previous style. It is useful in imperative-style printers (a sequence of "print a; print b; …").
Available only on OCaml >= 4.08.
val to_string : 'a printer -> 'a -> stringval of_chan : Stdlib.out_channel -> tAlias to Format.formatter_of_out_channel.
val with_out_chan : Stdlib.out_channel -> ( t -> 'a ) -> 'awith_out_chan oc f turns oc into a formatter fmt, and call f fmt. Behaves like f fmt from then on, but whether the call to f fails or returns, fmt is flushed before the call terminates.
val stdout : tval stderr : tval sprintf : ( 'a, t, unit, string ) Stdlib.format4 -> 'aPrint into a string any format string that would usually be compatible with fprintf. Like Format.asprintf.
val sprintf_no_color : ( 'a, t, unit, string ) Stdlib.format4 -> 'aLike sprintf but never prints colors.
val sprintf_dyn_color :
colors:bool ->
( 'a, t, unit, string ) Stdlib.format4 ->
'aLike sprintf but enable/disable colors depending on colors.
Example:
(* with colors *)
diff --git a/dev/containers/CCParse/index.html b/dev/containers/CCParse/index.html
index 61150c97..5f3f010b 100644
--- a/dev/containers/CCParse/index.html
+++ b/dev/containers/CCParse/index.html
@@ -24,7 +24,7 @@ let l_printed =
let l' = CCParse.parse_string_exn p l_printed;;
-assert (l=l');;Some functions are marked "experimental" and are still subject to change.
module Position : sig ... endmodule Error : sig ... endtype +'a or_error = ( 'a, Error.t ) Stdlib.result'a or_error is either Ok x for some result x : 'a, or an error Error.t.
See stringify_result and Error.to_string to print the error message.
exception ParseError of Error.tval return : 'a -> 'a tAlways succeeds, without consuming its input.
bind f p results in a new parser which behaves as p then, in case of success, applies f to the result.
val eoi : unit tExpect the end of input, fails otherwise.
val empty : unit tSucceed with ().
val fail : string -> 'a tfail msg fails with the given message. It can trigger a backtrack.
parsing s p behaves the same as p, with the information that we are parsing s, if p fails. The message s is added to the error, it does not replace it, not does the location change (the error still points to the same location as in p).
set_error_message msg p behaves like p, but if p fails, set_error_message msg p fails with msg instead and at the current position. The internal error message of p is just discarded.
with_pos p behaves like p, but returns the (starting) position along with p's result.
EXPERIMENTAL
val any_char : char tany_char parses any character. It still fails if the end of input was reached.
val any_char_n : int -> string tany_char_n len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.
val char : char -> char tchar c parses the character c and nothing else.
A slice of the input, as returned by some combinators such as split_1 or split_list or take.
The idea is that one can use some parsers to cut the input into slices, e.g. split into lines, or split a line into fields (think CSV or TSV). Then a variety of parsers can be used on each slice to extract data from it using recurse.
Slices contain enough information to make it possible for recurse slice p to report failures (if p fails) using locations from the original input, not relative to the slice. Therefore, even after splitting the input into lines using, say, each_line, a failure to parse the 500th line will be reported at line 500 and not at line 1.
EXPERIMENTAL
module Slice : sig ... endFunctions on slices.
recurse slice p parses the slice (most likely obtained via another combinator, such as split_1 or split_n), using p.
The slice contains a position which is used to relocate error messages to their position in the whole input, not just relative to the slice.
EXPERIMENTAL
set_current_slice slice replaces the parser's state with slice.
EXPERIMENTAL
val chars_fold :
+assert (l=l');;Some functions are marked "experimental" and are still subject to change.
module Position : sig ... endmodule Error : sig ... endtype +'a or_error = ( 'a, Error.t ) Stdlib.result'a or_error is either Ok x for some result x : 'a, or an error Error.t.
See stringify_result and Error.to_string to print the error message.
exception ParseError of Error.tval return : 'a -> 'a tAlways succeeds, without consuming its input.
bind f p results in a new parser which behaves as p then, in case of success, applies f to the result.
val eoi : unit tExpect the end of input, fails otherwise.
val empty : unit tSucceed with ().
val fail : string -> 'a tfail msg fails with the given message. It can trigger a backtrack.
parsing s p behaves the same as p, with the information that we are parsing s, if p fails. The message s is added to the error, it does not replace it, not does the location change (the error still points to the same location as in p).
set_error_message msg p behaves like p, but if p fails, set_error_message msg p fails with msg instead and at the current position. The internal error message of p is just discarded.
with_pos p behaves like p, but returns the (starting) position along with p's result.
EXPERIMENTAL
val any_char : char tany_char parses any character. It still fails if the end of input was reached.
val any_char_n : int -> string tany_char_n len parses exactly len characters from the input. Fails if the input doesn't contain at least len chars.
val char : char -> char tchar c parses the character c and nothing else.
A slice of the input, as returned by some combinators such as split_1 or split_list or take.
The idea is that one can use some parsers to cut the input into slices, e.g. split into lines, or split a line into fields (think CSV or TSV). Then a variety of parsers can be used on each slice to extract data from it using recurse.
Slices contain enough information to make it possible for recurse slice p to report failures (if p fails) using locations from the original input, not relative to the slice. Therefore, even after splitting the input into lines using, say, each_line, a failure to parse the 500th line will be reported at line 500 and not at line 1.
EXPERIMENTAL
module Slice : sig ... endFunctions on slices.
recurse slice p parses the slice (most likely obtained via another combinator, such as split_1 or split_n), using p.
The slice contains a position which is used to relocate error messages to their position in the whole input, not just relative to the slice.
EXPERIMENTAL
set_current_slice slice replaces the parser's state with slice.
EXPERIMENTAL
val chars_fold :
f:
( 'acc ->
char ->
diff --git a/dev/containers/CCResult/index.html b/dev/containers/CCResult/index.html
index 39291d81..ae291d79 100644
--- a/dev/containers/CCResult/index.html
+++ b/dev/containers/CCResult/index.html
@@ -6,7 +6,7 @@
'afail_fprintf format uses format to obtain an error message and then returns Error msg.
add_ctx msg leaves Ok x untouched, but transforms Error s into Error s' where s' contains the additional context given by msg.
val add_ctxf :
( 'a, Stdlib.Format.formatter, unit, ( 'b, string ) t -> ( 'b, string ) t )
Stdlib.format4 ->
- 'aadd_ctxf format_message is similar to add_ctx but with Format for printing the message (eagerly). Example:
add_ctxf "message(number %d, foo: %B)" 42 true (Error "error)"Map a fallible operation through an option.
add_ctxf format_message is similar to add_ctx but with Format for printing the message (eagerly). Example:
add_ctxf "message(number %d, foo: %B)" 42 true (Error "error)"Map a fallible operation through an option.
val map2 :
( 'a -> 'b ) ->
( 'err1 -> 'err2 ) ->
( 'a, 'err1 ) t ->
diff --git a/dev/containers/CCSeq/index.html b/dev/containers/CCSeq/index.html
index 462337ea..8c9d5d05 100644
--- a/dev/containers/CCSeq/index.html
+++ b/dev/containers/CCSeq/index.html
@@ -1,5 +1,5 @@
-CCSeq (containers.CCSeq) Module CCSeq
Helpers for the standard Seq type
See oseq for a richer API.
Basics
type +'a t = unit -> 'a nodeval nil : 'a tval empty : 'a tval singleton : 'a -> 'a tval repeat : ?n:int -> 'a -> 'a trepeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.
val unfold : ( 'b -> ('a * 'b) option ) -> 'b -> 'a tunfold f acc calls f acc and:
- if
f acc = Some (x, acc'), yield x, continue with unfold f acc'. - if
f acc = None, stops.
val is_empty : 'a t -> boolval head : 'a t -> 'a optionHead of the list.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aFold on values.
val iter : ( 'a -> unit ) -> 'a t -> unitval iteri : ( int -> 'a -> unit ) -> 'a t -> unitIterate with index (starts at 0).
val length : _ t -> intNumber of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.
Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.
Specialization of product_with producing tuples.
group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].
uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.
val for_all : ( 'a -> bool ) -> 'a t -> boolfor_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.
val exists : ( 'a -> bool ) -> 'a t -> boolexists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.
val range : int -> int -> int tval (--) : int -> int -> int ta -- b is the range of integers containing a and b (therefore, never empty).
val (--^) : int -> int -> int ta -- b is the integer range from a to b, where b is excluded.
Operations on two Collections
Fold on two collections at once. Stop at soon as one of them ends.
Map on two collections at once. Stop as soon as one of the arguments is exhausted.
Iterate on two collections at once. Stop as soon as one of them ends.
Combine elements pairwise. Stop as soon as one of the lists stops.
Misc
Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.
Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.
Fair Combinations
Implementations
val return : 'a -> 'a tval pure : 'a -> 'a tInfix version of fair_flat_map.
Infix operators
module Infix : sig ... endmodule type MONAD = sig ... endConversions
val of_list : 'a list -> 'a tval to_list : 'a t -> 'a listGather all values into a list.
val of_array : 'a array -> 'a tIterate on the array.
val to_array : 'a t -> 'a arrayConvert into array.
val of_string : string -> char tIterate on characters.
IO
val pp :
+CCSeq (containers.CCSeq) Module CCSeq
Helpers for the standard Seq type
See oseq for a richer API.
Basics
type +'a t = unit -> 'a nodeval nil : 'a tval empty : 'a tval singleton : 'a -> 'a tval repeat : ?n:int -> 'a -> 'a trepeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.
val unfold : ( 'b -> ('a * 'b) option ) -> 'b -> 'a tunfold f acc calls f acc and:
- if
f acc = Some (x, acc'), yield x, continue with unfold f acc'. - if
f acc = None, stops.
val is_empty : 'a t -> boolval head : 'a t -> 'a optionHead of the list.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aFold on values.
val iter : ( 'a -> unit ) -> 'a t -> unitval iteri : ( int -> 'a -> unit ) -> 'a t -> unitIterate with index (starts at 0).
val length : _ t -> intNumber of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.
Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.
Specialization of product_with producing tuples.
group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].
uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.
val for_all : ( 'a -> bool ) -> 'a t -> boolfor_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.
val exists : ( 'a -> bool ) -> 'a t -> boolexists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.
val range : int -> int -> int tval (--) : int -> int -> int ta -- b is the range of integers containing a and b (therefore, never empty).
val (--^) : int -> int -> int ta -- b is the integer range from a to b, where b is excluded.
Operations on two Collections
Fold on two collections at once. Stop at soon as one of them ends.
Map on two collections at once. Stop as soon as one of the arguments is exhausted.
Iterate on two collections at once. Stop as soon as one of them ends.
Combine elements pairwise. Stop as soon as one of the lists stops.
Misc
Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.
Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.
Fair Combinations
Implementations
val return : 'a -> 'a tval pure : 'a -> 'a tInfix version of fair_flat_map.
Infix operators
module Infix : sig ... endmodule type MONAD = sig ... endConversions
val of_list : 'a list -> 'a tval to_list : 'a t -> 'a listGather all values into a list.
val of_array : 'a array -> 'a tIterate on the array.
val to_array : 'a t -> 'a arrayConvert into array.
val of_string : string -> char tIterate on characters.
IO
val pp :
?pp_start:unit printer ->
?pp_stop:unit printer ->
?pp_sep:unit printer ->
diff --git a/dev/containers/CCVector/index.html b/dev/containers/CCVector/index.html
index c07476dc..37dee65f 100644
--- a/dev/containers/CCVector/index.html
+++ b/dev/containers/CCVector/index.html
@@ -1,5 +1,5 @@
-CCVector (containers.CCVector) Module CCVector
Growable, mutable vector
Mutability is rw (read-write) or ro (read-only).
Make an immutable vector (no copy! Don't use the old version).
Create a new vector, the value is used to enforce the type the new vector.
val return : 'a -> ( 'a, 'mut ) tSingleton vector.
val make : int -> 'a -> ( 'a, 'mut ) tmake n x makes a vector of size n, filled with x.
val init : int -> ( int -> 'a ) -> ( 'a, 'mut ) tInit the vector with the given function and size.
Clear the content of the vector. This ensures that length v = 0 but the underlying array is kept, and possibly references to former elements, which are therefore not garbage collectible.
Clear the content of the vector, and deallocate the underlying array, removing references to all the elements. The elements can be collected.
Hint to the vector that it should have at least the given capacity. This does not affect length v.
Hint to the vector that it should have at least the given capacity. Just a hint, will not be enforced if the vector is empty and init is not provided.
val is_empty : ( 'a, _ ) t -> boolIs the vector empty?
resize_with vec f size resizes vector vec up to size, fills vector with calls to f on indexes [vec.size-1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.
resize_with_init vec init size resizes vector vec up to size, fills vector with calls to init on indexes [length vec -1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.
Append content of iterator. Renamed from append_std_seq since 3.0.
val top : ( 'a, _ ) t -> 'a optionTop element, if present.
val top_exn : ( 'a, _ ) t -> 'aTop element, if present.
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.
val shrink_to_fit : ( 'a, _ ) t -> unitShrink internal array to fit the size of the vector
val member : eq:( 'a -> 'a -> bool ) -> 'a -> ( 'a, _ ) t -> boolIs the element a member of the vector?
Sort the vector, returning a copy of it that is sorted w.r.t the given ordering. The vector itself is unchanged. The underlying array of the new vector can be smaller than the original one.
Sort the vector in place (modifying it). This function change the size of the underlying array.
Sort the array and remove duplicates, in place (e.g. modifying the vector itself).
val iter : ( 'a -> unit ) -> ( 'a, _ ) t -> unitIterate on the vector's content.
val iteri : ( int -> 'a -> unit ) -> ( 'a, _ ) t -> unitIterate on the vector, with indexes.
Map elements of the vector, yielding a new vector.
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.
val map_in_place : ( 'a -> 'a ) -> ( 'a, _ ) t -> unitMap elements of the vector in place
Filter elements from the vector. filter p v leaves v unchanged but returns a new vector that only contains elements of v satisfying p.
Filter elements from the vector in place.
val fold : ( 'b -> 'a -> 'b ) -> 'b -> ( 'a, _ ) t -> 'bFold on elements of the vector
val exists : ( 'a -> bool ) -> ( 'a, _ ) t -> boolExistential test (is there an element that satisfies the predicate?).
val for_all : ( 'a -> bool ) -> ( 'a, _ ) t -> boolUniversal test (do all the elements satisfy the predicate?).
val find : ( 'a -> bool ) -> ( 'a, _ ) t -> 'a optionFind an element that satisfies the predicate.
val find_exn : ( 'a -> bool ) -> ( 'a, _ ) t -> 'aFind an element that satisfies the predicate, or
val find_map : ( 'a -> 'b option ) -> ( 'a, _ ) t -> 'b optionfind_map f v returns the first Some y = f x for x in v, or None if f x = None for each x in v.
Map elements with a function, possibly filtering some of them out.
val filter_map_in_place : ( 'a -> 'a option ) -> ( 'a, _ ) t -> unitFilter-map elements of the vector in place
Map each element to a sub-vector.
Like flat_map, but using Seq for intermediate collections. Renamed from flat_map_std_seq since 3.0.
Like flat_map, but using list for intermediate collections.
val monoid_product :
+CCVector (containers.CCVector) Module CCVector
Growable, mutable vector
Mutability is rw (read-write) or ro (read-only).
Make an immutable vector (no copy! Don't use the old version).
Create a new vector, the value is used to enforce the type the new vector.
val return : 'a -> ( 'a, 'mut ) tSingleton vector.
val make : int -> 'a -> ( 'a, 'mut ) tmake n x makes a vector of size n, filled with x.
val init : int -> ( int -> 'a ) -> ( 'a, 'mut ) tInit the vector with the given function and size.
Clear the content of the vector. This ensures that length v = 0 but the underlying array is kept, and possibly references to former elements, which are therefore not garbage collectible.
Clear the content of the vector, and deallocate the underlying array, removing references to all the elements. The elements can be collected.
Hint to the vector that it should have at least the given capacity. This does not affect length v.
Hint to the vector that it should have at least the given capacity. Just a hint, will not be enforced if the vector is empty and init is not provided.
val is_empty : ( 'a, _ ) t -> boolIs the vector empty?
resize_with vec f size resizes vector vec up to size, fills vector with calls to f on indexes [vec.size-1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.
resize_with_init vec init size resizes vector vec up to size, fills vector with calls to init on indexes [length vec -1.. size - 1]. The contents and size of vec are untouched if size is inferior or equal to length vec.
Append content of iterator. Renamed from append_std_seq since 3.0.
val top : ( 'a, _ ) t -> 'a optionTop element, if present.
val top_exn : ( 'a, _ ) t -> 'aTop element, if present.
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.
val shrink_to_fit : ( 'a, _ ) t -> unitShrink internal array to fit the size of the vector
val member : eq:( 'a -> 'a -> bool ) -> 'a -> ( 'a, _ ) t -> boolIs the element a member of the vector?
Sort the vector, returning a copy of it that is sorted w.r.t the given ordering. The vector itself is unchanged. The underlying array of the new vector can be smaller than the original one.
Sort the vector in place (modifying it). This function change the size of the underlying array.
Sort the array and remove duplicates, in place (e.g. modifying the vector itself).
val iter : ( 'a -> unit ) -> ( 'a, _ ) t -> unitIterate on the vector's content.
val iteri : ( int -> 'a -> unit ) -> ( 'a, _ ) t -> unitIterate on the vector, with indexes.
Map elements of the vector, yielding a new vector.
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.
val map_in_place : ( 'a -> 'a ) -> ( 'a, _ ) t -> unitMap elements of the vector in place
Filter elements from the vector. filter p v leaves v unchanged but returns a new vector that only contains elements of v satisfying p.
Filter elements from the vector in place.
val fold : ( 'b -> 'a -> 'b ) -> 'b -> ( 'a, _ ) t -> 'bFold on elements of the vector
val exists : ( 'a -> bool ) -> ( 'a, _ ) t -> boolExistential test (is there an element that satisfies the predicate?).
val for_all : ( 'a -> bool ) -> ( 'a, _ ) t -> boolUniversal test (do all the elements satisfy the predicate?).
val find : ( 'a -> bool ) -> ( 'a, _ ) t -> 'a optionFind an element that satisfies the predicate.
val find_exn : ( 'a -> bool ) -> ( 'a, _ ) t -> 'aFind an element that satisfies the predicate, or
val find_map : ( 'a -> 'b option ) -> ( 'a, _ ) t -> 'b optionfind_map f v returns the first Some y = f x for x in v, or None if f x = None for each x in v.
Map elements with a function, possibly filtering some of them out.
val filter_map_in_place : ( 'a -> 'a option ) -> ( 'a, _ ) t -> unitFilter-map elements of the vector in place
Map each element to a sub-vector.
Like flat_map, but using Seq for intermediate collections. Renamed from flat_map_std_seq since 3.0.
Like flat_map, but using list for intermediate collections.
val monoid_product :
( 'a -> 'b -> 'c ) ->
( 'a, _ ) t ->
( 'b, _ ) t ->
diff --git a/dev/index.html b/dev/index.html
index aa9b9ed7..bbf063f8 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -11,9 +11,9 @@
OCaml package documentation
- - containers 3.6.1
- - containers-data 3.6.1
- - containers-thread 3.6.1
+ - containers 3.7
+ - containers-data 3.7
+ - containers-thread 3.7