diff --git a/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html b/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html index 06bb4559..429c99f2 100644 --- a/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html +++ b/dev/containers-data/CCMutHeap/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -
Make.1-Xval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitIndex in heap. return -1 if never set
Update index in heap
Make.1-Xval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCMutHeap_intf.RANKEDval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitIndex in heap. return -1 if never set
Update index in heap
CCMutHeap_intf.RANKEDval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCPersistentArrayPersistent Arrays
From the paper by Jean-Christophe Filliâtre, "A persistent Union-Find data structure", see the ps version
val make : int -> 'a -> 'a tmake n x returns a persistent array of length n, with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.
val init : int -> ( int -> 'a ) -> 'a tinit n f returns a persistent array of length n, with element i initialized to the result of f i.
val get : 'a t -> int -> 'aget a i returns the element with index i from the array a.
val length : 'a t -> intReturn the length of the persistent array.
Apply the given function to all elements of the array, and return a persistent array initialized by the results of f. In the case of mapi, the function is also given the index of the element. It is equivalent to fun f t -> init (fun i -> f (get t i)).
val iter : ( 'a -> unit ) -> 'a t -> unititer f t applies function f to all elements of the persistent array, in order from element 0 to element length t - 1.
val iteri : ( int -> 'a -> unit ) -> 'a t -> unititer f t applies function f to all elements of the persistent array, in order from element 0 to element length t - 1.
val fold_left : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aval fold_right : ( 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'bFold on the elements of the array.
val to_array : 'a t -> 'a arrayto_array t returns a mutable copy of t.
val of_array : 'a array -> 'a tof_array a returns an immutable copy of a.
val to_list : 'a t -> 'a listto_list t returns the list of elements in t.
val of_list : 'a list -> 'a tof_list l returns a fresh persistent array containing the elements of l.
val of_rev_list : 'a list -> 'a tof_rev_list l is the same as of_list (List.rev l) but more efficient.
CCPersistentArrayPersistent Arrays
From the paper by Jean-Christophe Filliâtre, "A persistent Union-Find data structure", see the ps version
val make : int -> 'a -> 'a tmake n x returns a persistent array of length n, with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.
val init : int -> ( int -> 'a ) -> 'a tinit n f returns a persistent array of length n, with element i initialized to the result of f i.
val get : 'a t -> int -> 'aget a i returns the element with index i from the array a.
val length : 'a t -> intReturn the length of the persistent array.
Apply the given function to all elements of the array, and return a persistent array initialized by the results of f. In the case of mapi, the function is also given the index of the element. It is equivalent to fun f t -> init (fun i -> f (get t i)).
val iter : ( 'a -> unit ) -> 'a t -> unititer f t applies function f to all elements of the persistent array, in order from element 0 to element length t - 1.
val iteri : ( int -> 'a -> unit ) -> 'a t -> unitval fold_left : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aval fold_right : ( 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'bFold on the elements of the array.
val to_array : 'a t -> 'a arrayto_array t returns a mutable copy of t.
val of_array : 'a array -> 'a tof_array a returns an immutable copy of a.
val to_list : 'a t -> 'a listto_list t returns the list of elements in t.
val of_list : 'a list -> 'a tof_list l returns a fresh persistent array containing the elements of l.
val of_rev_list : 'a list -> 'a tof_rev_list l is the same as of_list (List.rev l) but more efficient.
Fut.InfixFut.InfixMake.FutThe futures are registration points for callbacks, storing a state, that are executed in the pool using run.
type 'a future = 'a tval return : 'a -> 'a tFuture that is already computed.
val fail : exn -> 'a tFuture that fails immediately.
val make : ( unit -> 'a ) -> 'a tCreate a future, representing a value that will be computed by the function. If the function raises, the future will fail.
val make1 : ( 'a -> 'b ) -> 'a -> 'b tval make2 : ( 'a -> 'b -> 'c ) -> 'a -> 'b -> 'c tval get : 'a t -> 'aBlocking get: wait for the future to be evaluated, and get the value, or the exception that failed the future is returned. Raise e if the future failed with e.
val is_done : 'a t -> boolIs the future evaluated (success/failure)?
val on_success : 'a t -> ( 'a -> unit ) -> unitAttach a handler to be called upon success. The handler should not call functions on the future. Might be evaluated now if the future is already done.
val on_failure : _ t -> ( exn -> unit ) -> unitAttach a handler to be called upon failure. The handler should not call any function on the future. Might be evaluated now if the future is already done.
Attach a handler to be called when the future is evaluated. The handler should not call functions on the future. Might be evaluated now if the future is already done.
Wait for the first future to succeed, then launch the second.
Future that waits for all previous futures to terminate. If any future in the array fails, sequence_a l fails too.
map_a f a maps f on every element of a, and will return the array of every result if all calls succeed, or an error otherwise.
Future that waits for all previous futures to terminate. If any future in the list fails, sequence_l l fails too.
map_l f l maps f on every element of l, and will return the list of every result if all calls succeed, or an error otherwise.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Map the value inside the future, to be computed in a separated job.
Cartesian product of the content of these futures.
app_async f x applies the result of f to the result of x, in a separated job scheduled in the pool.
val sleep : float -> unit tFuture that returns with success in the given amount of seconds. Blocks the thread! If you need to wait on many events, consider using CCTimer.
module Infix : sig ... endMake.FutThe futures are registration points for callbacks, storing a state, that are executed in the pool using run.
type 'a future = 'a tval return : 'a -> 'a tFuture that is already computed.
val fail : exn -> 'a tFuture that fails immediately.
val make : ( unit -> 'a ) -> 'a tCreate a future, representing a value that will be computed by the function. If the function raises, the future will fail.
val make1 : ( 'a -> 'b ) -> 'a -> 'b tval make2 : ( 'a -> 'b -> 'c ) -> 'a -> 'b -> 'c tval get : 'a t -> 'aBlocking get: wait for the future to be evaluated, and get the value, or the exception that failed the future is returned. Raise e if the future failed with e.
val is_done : 'a t -> boolIs the future evaluated (success/failure)?
val on_success : 'a t -> ( 'a -> unit ) -> unitAttach a handler to be called upon success. The handler should not call functions on the future. Might be evaluated now if the future is already done.
val on_failure : _ t -> ( exn -> unit ) -> unitAttach a handler to be called upon failure. The handler should not call any function on the future. Might be evaluated now if the future is already done.
Attach a handler to be called when the future is evaluated. The handler should not call functions on the future. Might be evaluated now if the future is already done.
Wait for the first future to succeed, then launch the second.
Future that waits for all previous futures to terminate. If any future in the array fails, sequence_a l fails too.
map_a f a maps f on every element of a, and will return the array of every result if all calls succeed, or an error otherwise.
Future that waits for all previous futures to terminate. If any future in the list fails, sequence_l l fails too.
map_l f l maps f on every element of l, and will return the list of every result if all calls succeed, or an error otherwise.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Map the value inside the future, to be computed in a separated job.
Cartesian product of the content of these futures.
app_async f x applies the result of f to the result of x, in a separated job scheduled in the pool.
val sleep : float -> unit tFuture that returns with success in the given amount of seconds. Blocks the thread! If you need to wait on many events, consider using CCTimer.
module Infix : sig ... endinclude module type of InfixCCArray.FloatarrayCCArrayArray utils
include module type of struct include Stdlib.Array endval empty : 'a tempty is the empty array, physically equal to [||].
equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.
compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.
val swap : 'a t -> int -> int -> unitswap a i j swaps elements at indices i and j.
val get_safe : 'a t -> int -> 'a optionget_safe a i returns Some a.(i) if i is a valid index.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'afold f init a computes f (… (f (f init a.(0)) a.(1)) …) a.(n-1), where n is the length of the array a. Same as Array.fold_left
val foldi : ( 'a -> int -> 'b -> 'a ) -> 'a -> 'b t -> 'afoldi f init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.
val fold_while : ( 'a -> 'b -> 'a * [ `Stop | `Continue ] ) -> 'a -> 'b t -> 'afold_while f init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.
fold_map f init a is a fold_left-like function, but it also maps the array to another array.
scan_left f init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); …|] .
val reverse_in_place : 'a t -> unitreverse_in_place a reverses the array a in place.
val sorted : ( 'a -> 'a -> int ) -> 'a t -> 'a arraysorted f a makes a copy of a and sorts it with f.
val sort_indices : ( 'a -> 'a -> int ) -> 'a t -> int arraysort_indices f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.
In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.
val sort_ranking : ( 'a -> 'a -> int ) -> 'a t -> int arraysort_ranking f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.
In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.
In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).
val mem : ?eq:( 'a -> 'a -> bool ) -> 'a -> 'a t -> boolmem ~eq x a return true if x is present in a. Linear time.
val find_map : ( 'a -> 'b option ) -> 'a t -> 'b optionfind_map f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.
val find_map_i : ( int -> 'a -> 'b option ) -> 'a t -> 'b optionfind_map_i f a is like find_map, but the index of the element is also passed to the predicate function f.
val find_idx : ( 'a -> bool ) -> 'a t -> (int * 'a) optionfind_idx f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.
lookup ~cmp key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt ~cmp. Complexity: O(log (n)) (dichotomic search).
val bsearch :
+CCArray (containers.CCArray) Module CCArray
Array utils
Arrays
module Floatarray : sig ... endval empty : 'a tempty is the empty array, physically equal to [||].
equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.
compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.
val swap : 'a t -> int -> int -> unitswap a i j swaps elements at indices i and j.
val get_safe : 'a t -> int -> 'a optionget_safe a i returns Some a.(i) if i is a valid index.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'afold f init a computes f (… (f (f init a.(0)) a.(1)) …) a.(n-1), where n is the length of the array a. Same as Array.fold_left
val foldi : ( 'a -> int -> 'b -> 'a ) -> 'a -> 'b t -> 'afoldi f init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.
val fold_while : ( 'a -> 'b -> 'a * [ `Stop | `Continue ] ) -> 'a -> 'b t -> 'afold_while f init a folds left on array a until a stop condition via ('a, `Stop) is indicated by the accumulator.
fold_map f init a is a fold_left-like function, but it also maps the array to another array.
scan_left f init a returns the array [|init; f init x0; f (f init a.(0)) a.(1); …|] .
val reverse_in_place : 'a t -> unitreverse_in_place a reverses the array a in place.
val sorted : ( 'a -> 'a -> int ) -> 'a t -> 'a arraysorted f a makes a copy of a and sorts it with f.
val sort_indices : ( 'a -> 'a -> int ) -> 'a t -> int arraysort_indices f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of sorted f a appears in a. a is not modified.
In other words, map (fun i -> a.(i)) (sort_indices f a) = sorted f a. sort_indices yields the inverse permutation of sort_ranking.
val sort_ranking : ( 'a -> 'a -> int ) -> 'a t -> int arraysort_ranking f a returns a new array b, with the same length as a, such that b.(i) is the index at which the i-th element of a appears in sorted f a. a is not modified.
In other words, map (fun i -> (sorted f a).(i)) (sort_ranking f a) = a. sort_ranking yields the inverse permutation of sort_indices.
In the absence of duplicate elements in a, we also have lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i).
val mem : ?eq:( 'a -> 'a -> bool ) -> 'a -> 'a t -> boolmem ~eq x a return true if x is present in a. Linear time.
val find_map : ( 'a -> 'b option ) -> 'a t -> 'b optionfind_map f a returns Some y if there is an element x such that f x = Some y. Otherwise returns None.
val find_map_i : ( int -> 'a -> 'b option ) -> 'a t -> 'b optionfind_map_i f a is like find_map, but the index of the element is also passed to the predicate function f.
val find_idx : ( 'a -> bool ) -> 'a t -> (int * 'a) optionfind_idx f a returns Some (i,x) where x is the i-th element of a, and f x holds. Otherwise returns None.
lookup ~cmp key a lookups the index of some key key in a sorted array a. Undefined behavior if the array a is not sorted wrt ~cmp. Complexity: O(log (n)) (dichotomic search).
val bsearch :
cmp:( 'a -> 'a -> int ) ->
'a ->
'a t ->
diff --git a/dev/containers/CCArrayLabels/index.html b/dev/containers/CCArrayLabels/index.html
index 8d9732bc..7fdd4280 100644
--- a/dev/containers/CCArrayLabels/index.html
+++ b/dev/containers/CCArrayLabels/index.html
@@ -1,6 +1,5 @@
-CCArrayLabels (containers.CCArrayLabels) Module CCArrayLabels
Array utils (Labeled version of CCArray)
Arrays
include module type of Stdlib.ArrayLabels
- with module Floatarray = Stdlib.Array.Floatarray
val blit :
+CCArrayLabels (containers.CCArrayLabels) Module CCArrayLabels
Array utils (Labeled version of CCArray)
Arrays
module Floatarray : sig ... endval empty : 'a tempty is the empty array, physically equal to ||.
equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.
compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.
val swap : 'a t -> int -> int -> unitswap a i j swaps elements at indices i and j.
val get_safe : 'a t -> int -> 'a optionget_safe a i returns Some a.(i) if i is a valid index.
val fold : f:( 'a -> 'b -> 'a ) -> init:'a -> 'b t -> 'afold ~f ~init a computes f (… (f (f init a.(0)) a.(1)) …) a.(n-1), where n is the length of the array a. Same as ArrayLabels.fold_left
val foldi : f:( 'a -> int -> 'b -> 'a ) -> init:'a -> 'b t -> 'afoldi ~f ~init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.
module Floatarray : sig ... endval empty : 'a tempty is the empty array, physically equal to ||.
equal eq a1 a2 is true if the lengths of a1 and a2 are the same and if their corresponding elements test equal, using eq.
compare cmp a1 a2 compares arrays a1 and a2 using the function comparison cmp.
val swap : 'a t -> int -> int -> unitswap a i j swaps elements at indices i and j.
val get_safe : 'a t -> int -> 'a optionget_safe a i returns Some a.(i) if i is a valid index.
val fold : f:( 'a -> 'b -> 'a ) -> init:'a -> 'b t -> 'afold ~f ~init a computes f (… (f (f init a.(0)) a.(1)) …) a.(n-1), where n is the length of the array a. Same as ArrayLabels.fold_left
val foldi : f:( 'a -> int -> 'b -> 'a ) -> init:'a -> 'b t -> 'afoldi ~f ~init a is just like fold, but it also passes in the index of each element as the second argument to the folded function f.
val fold_while :
f:( 'a -> 'b -> 'a * [ `Stop | `Continue ] ) ->
init:'a ->
'b t ->
diff --git a/dev/containers/CCFun/index.html b/dev/containers/CCFun/index.html
index bd318215..bdd28b42 100644
--- a/dev/containers/CCFun/index.html
+++ b/dev/containers/CCFun/index.html
@@ -1,5 +1,5 @@
-CCFun (containers.CCFun) Module CCFun
Basic operations on Functions
compose_binop f g is fun x y -> g (f x) (f y). Example (partial order): List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false].
curry f x y is f (x,y). Convert a function which accepts a pair of arguments into a function which accepts two arguments.
uncurry f (x,y) is f x y. Convert a function which accepts a two arguments into a function which accepts a pair of arguments.
tap f x evaluates f x, discards it, then returns x. Useful in a pipeline, for instance:
CCArray.(1 -- 10)
+CCFun (containers.CCFun) Module CCFun
Basic operations on Functions
compose_binop f g is fun x y -> g (f x) (f y). Example (partial order): List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false].
curry f x y is f (x,y). Convert a function which accepts a pair of arguments into a function which accepts two arguments.
uncurry f (x,y) is f x y. Convert a function which accepts a two arguments into a function which accepts a pair of arguments.
tap f x evaluates f x, discards it, then returns x. Useful in a pipeline, for instance:
CCArray.(1 -- 10)
|> tap CCArray.shuffle
|> tap @@ CCArray.sort Stdlib.compare
val lexicographic :
( 'a -> 'a -> int ) ->
diff --git a/dev/containers/CCInt/index.html b/dev/containers/CCInt/index.html
index 5b77de3b..25ada972 100644
--- a/dev/containers/CCInt/index.html
+++ b/dev/containers/CCInt/index.html
@@ -1,2 +1,2 @@
-CCInt (containers.CCInt) Module CCInt
Basic Int functions
include module type of struct include Stdlib.Int end
val zero : tzero is the integer 0.
val one : tone is the integer 1.
val minus_one : tminus_one is the integer -1.
val max_int : tmax_int is the maximum integer.
val min_int : tmin_int is the minimum integer.
compare x y is the comparison function for integers with the same specification as Stdlib.compare.
val hash : t -> inthash x computes the hash of x.
val sign : t -> intsign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x 0.
pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.
floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.
val random : int -> t random_genval random_small : t random_genval random_range : int -> int -> t random_genval to_float : t -> floatto_float is the same as float_of_int
val to_string : t -> stringto_string x returns the string representation of the integer x, in signed decimal.
val of_string : string -> t optionof_string s converts the given string s into an integer. Safe version of of_string_exn.
val of_string_exn : string -> tof_string_exn s converts the given string s to an integer. Alias to int_of_string.
val of_float : float -> tof_float x converts the given floating-point number x to an integer. Alias to int_of_float.
val to_string_binary : t -> stringto_string_binary x returns the string representation of the integer x, in binary.
range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.
range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.
range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].
val popcount : t -> intNumber of bits set to 1
Infix Operators
module Infix : sig ... endinclude module type of Infix
\ No newline at end of file
+CCInt (containers.CCInt) Module CCInt
Basic Int functions
val zero : tzero is the integer 0.
val one : tone is the integer 1.
val minus_one : tminus_one is the integer -1.
val max_int : tmax_int is the maximum integer.
val min_int : tmin_int is the minimum integer.
compare x y is the comparison function for integers with the same specification as Stdlib.compare.
val hash : t -> inthash x computes the hash of x.
val sign : t -> intsign x return 0 if x = 0, -1 if x < 0 and 1 if x > 0. Same as compare x 0.
pow base exponent returns base raised to the power of exponent. pow x y = x^y for positive integers x and y. Raises Invalid_argument if x = y = 0 or y < 0.
floor_div x n is integer division rounding towards negative infinity. It satisfies x = m * floor_div x n + rem x n.
val random : int -> t random_genval random_small : t random_genval random_range : int -> int -> t random_genval to_float : t -> floatto_float is the same as float_of_int
val to_string : t -> stringto_string x returns the string representation of the integer x, in signed decimal.
val of_string : string -> t optionof_string s converts the given string s into an integer. Safe version of of_string_exn.
val of_string_exn : string -> tof_string_exn s converts the given string s to an integer. Alias to int_of_string.
val of_float : float -> tof_float x converts the given floating-point number x to an integer. Alias to int_of_float.
val to_string_binary : t -> stringto_string_binary x returns the string representation of the integer x, in binary.
range_by ~step i j iterates on integers from i to j included, where the difference between successive elements is step. Use a negative step for a decreasing list.
range i j iterates on integers from i to j included . It works both for decreasing and increasing ranges.
range' i j is like range but the second bound j is excluded. For instance range' 0 5 = Iter.of_list [0;1;2;3;4].
val popcount : t -> intNumber of bits set to 1
Infix Operators
module Infix : sig ... endinclude module type of Infix
\ No newline at end of file
diff --git a/dev/containers/CCList/Infix/index.html b/dev/containers/CCList/Infix/index.html
index 021985cd..12311d03 100644
--- a/dev/containers/CCList/Infix/index.html
+++ b/dev/containers/CCList/Infix/index.html
@@ -1,9 +1,9 @@
-Infix (containers.CCList.Infix) Module CCList.Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
Let operators on OCaml >= 4.08.0, nothing otherwise
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
+Infix (containers.CCList.Infix) Module CCList.Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
let+ x = xs
and& y = ys
and& z = zs in
x + y + z;;
val f : int list -> int list -> int list -> int list = <fun>
# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
\ No newline at end of file
+- : int list = [16; 18]
\ No newline at end of file
diff --git a/dev/containers/CCList/index.html b/dev/containers/CCList/index.html
index b3afd469..726d4dc4 100644
--- a/dev/containers/CCList/index.html
+++ b/dev/containers/CCList/index.html
@@ -1,5 +1,5 @@
-CCList (containers.CCList) Module CCList
Complements to List
include module type of Stdlib.List
val empty : 'a tempty is [].
val is_empty : _ t -> boolis_empty l returns true iff l = [].
map f [a0; a1; …; an] applies function f in turn to a0; a1; …; an. Safe version of List.map.
append l1 l2 returns the list that is the concatenation of l1 and l2. Safe version of List.append.
cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.
filter p l returns all the elements of the list l that satisfy the predicate p. The order of the elements in the input list l is preserved. Safe version of List.filter.
val fold_right : ( 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'bfold_right f [a1; …; an] b is f a1 (f a2 ( … (f an b) … )). Safe version of List.fold_right.
val fold_while : ( 'a -> 'b -> 'a * [ `Stop | `Continue ] ) -> 'a -> 'b t -> 'afold_while f init l folds until a stop condition via ('a, `Stop) is indicated by the accumulator.
fold_map f init l is a fold_left-like function, but it also maps the list to another list.
val fold_map_i :
+CCList (containers.CCList) Module CCList
Complements to List
val empty : 'a tempty is [].
val is_empty : _ t -> boolis_empty l returns true iff l = [].
map f [a0; a1; …; an] applies function f in turn to a0; a1; …; an. Safe version of List.map.
append l1 l2 returns the list that is the concatenation of l1 and l2. Safe version of List.append.
cons' l x is the same as x :: l. This is convenient for fold functions such as List.fold_left or Array.fold_left.
filter p l returns all the elements of the list l that satisfy the predicate p. The order of the elements in the input list l is preserved. Safe version of List.filter.
val fold_right : ( 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'bfold_right f [a1; …; an] b is f a1 (f a2 ( … (f an b) … )). Safe version of List.fold_right.
val fold_while : ( 'a -> 'b -> 'a * [ `Stop | `Continue ] ) -> 'a -> 'b t -> 'afold_while f init l folds until a stop condition via ('a, `Stop) is indicated by the accumulator.
fold_map f init l is a fold_left-like function, but it also maps the list to another list.
val fold_map_i :
( 'acc -> int -> 'a -> 'acc * 'b ) ->
'acc ->
'a list ->
@@ -99,14 +99,14 @@ val square_even : int list -> int list = <fun>
?sep:string ->
( 'a -> string ) ->
'a t ->
- stringto_string ?start ?stop ?sep item_to_string l prints l to a string using sep as a separator between elements of l.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.
of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.
val of_seq_rev : 'a Stdlib.Seq.t -> 'a tof_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from to_std_seq_rev since 3.0.
val of_seq : 'a Stdlib.Seq.t -> 'a tof_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.
Infix Operators
It is convenient to open CCList.Infix to access the infix operators without cluttering the scope too much.
module Infix : sig ... endinclude module type of Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
Let operators on OCaml >= 4.08.0, nothing otherwise
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
+ string
to_string ?start ?stop ?sep item_to_string l prints l to a string using sep as a separator between elements of l.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.
of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.
val of_seq_rev : 'a Stdlib.Seq.t -> 'a tof_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from to_std_seq_rev since 3.0.
val of_seq : 'a Stdlib.Seq.t -> 'a tof_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.
Infix Operators
It is convenient to open CCList.Infix to access the infix operators without cluttering the scope too much.
module Infix : sig ... endinclude module type of Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
let+ x = xs
and& y = ys
and& z = zs in
x + y + z;;
val f : int list -> int list -> int list -> int list = <fun>
# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
IO
IO
val pp :
?pp_start:unit printer ->
?pp_stop:unit printer ->
?pp_sep:unit printer ->
diff --git a/dev/containers/CCListLabels/Infix/index.html b/dev/containers/CCListLabels/Infix/index.html
index 3a5b5ff1..db65812e 100644
--- a/dev/containers/CCListLabels/Infix/index.html
+++ b/dev/containers/CCListLabels/Infix/index.html
@@ -1,9 +1,9 @@
-Infix (containers.CCListLabels.Infix) Module CCListLabels.Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
Let operators on OCaml >= 4.08.0, nothing otherwise
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
+Infix (containers.CCListLabels.Infix) Module CCListLabels.Infix
l >|= f is the infix version of map with reversed arguments.
l1 @ l2 concatenates two lists l1 and l2. As append.
funs <*> l is product (fun f x -> f x) funs l.
val (--) : int -> int -> int CCList.ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int CCList.ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
let+ x = xs
and& y = ys
and& z = zs in
x + y + z;;
val f : int list -> int list -> int list -> int list = <fun>
# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
\ No newline at end of file
+- : int list = [16; 18]
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/index.html b/dev/containers/CCListLabels/index.html
index e9841f28..df933579 100644
--- a/dev/containers/CCListLabels/index.html
+++ b/dev/containers/CCListLabels/index.html
@@ -121,14 +121,14 @@ val square_even : int list -> int list = <fun>
?sep:string ->
( 'a -> string ) ->
'a t ->
- stringto_string ?start ?stop ?sep item_to_string l print l to a string using sep as a separator between elements of l.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.
of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.
val of_seq_rev : 'a Stdlib.Seq.t -> 'a tof_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from of_std_seq_rev since 3.0.
val of_seq : 'a Stdlib.Seq.t -> 'a tof_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.
Infix Operators
It is convenient to openCCList.Infix to access the infix operators without cluttering the scope too much.
module Infix : sig ... endinclude module type of Infix
l >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
Let operators on OCaml >= 4.08.0, nothing otherwise
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
+ string
to_string ?start ?stop ?sep item_to_string l print l to a string using sep as a separator between elements of l.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq l returns a Seq.t of the elements of the list l. Renamed from to_std_seq since 3.0.
of_iter iter builds a list from a given iter. In the result, elements appear in the same order as they did in the source iter.
val of_seq_rev : 'a Stdlib.Seq.t -> 'a tof_seq_rev seq builds a list from a given Seq.t, in reverse order. Renamed from of_std_seq_rev since 3.0.
val of_seq : 'a Stdlib.Seq.t -> 'a tof_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
of_gen gen builds a list from a given gen. In the result, elements appear in the same order as they did in the source gen.
Infix Operators
It is convenient to openCCList.Infix to access the infix operators without cluttering the scope too much.
module Infix : module type of CCList.Infixinclude module type of Infix
l >|= f is the infix version of map with reversed arguments.
l1 @ l2 concatenates two lists l1 and l2. As append.
funs <*> l is product (fun f x -> f x) funs l.
val (--) : int -> int -> int CCList.ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int CCList.ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
let+ x = xs
and& y = ys
and& z = zs in
x + y + z;;
val f : int list -> int list -> int list -> int list = <fun>
# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
IO
IO
val pp :
?pp_start:unit printer ->
?pp_stop:unit printer ->
?pp_sep:unit printer ->
diff --git a/dev/containers/CCMonomorphicShims_/index.html b/dev/containers/CCMonomorphicShims_/index.html
deleted file mode 100644
index d4f17673..00000000
--- a/dev/containers/CCMonomorphicShims_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCMonomorphicShims_ (containers.CCMonomorphicShims_) Module CCMonomorphicShims_
\ No newline at end of file
diff --git a/dev/containers/CCOpt/Infix/index.html b/dev/containers/CCOpt/Infix/index.html
index b922367a..478fd2d3 100644
--- a/dev/containers/CCOpt/Infix/index.html
+++ b/dev/containers/CCOpt/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCOpt.Infix) Module CCOpt.Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
\ No newline at end of file
+Infix (containers.CCOpt.Infix) Module CCOpt.Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
\ No newline at end of file
diff --git a/dev/containers/CCOpt/index.html b/dev/containers/CCOpt/index.html
index 56a77000..43d25931 100644
--- a/dev/containers/CCOpt/index.html
+++ b/dev/containers/CCOpt/index.html
@@ -4,4 +4,4 @@
( 'a -> 'b -> 'c ) ->
'a ->
'b ->
- 'c optionwrap2 ?handler f x y is similar to wrap but for binary functions.
Applicative
Alternatives
or_lazy ~else_ o is o if o is Some _, else_ () if o is None.
val return_if : bool -> 'a -> 'a treturn_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.
Infix Operators
module Infix : sig ... endinclude module type of Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
Conversion and IO
val to_list : 'a t -> 'a listto_list o returns [x] if o is Some x or the empty list [] if o is None.
val of_list : 'a list -> 'a tof_list l returns Some x (x being the head of the list l), or None if l is the empty list.
val to_result : 'e -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result e o returns Ok x if o is Some x, or Error e if o is None.
val to_result_lazy : ( unit -> 'e ) -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result_lazy f o returns Ok x if o is Some x or Error f if o is None.
val of_result : ( 'a, _ ) Stdlib.result -> 'a tof_result result returns an option from a result.
val random : 'a random_gen -> 'a t random_genchoice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.
choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.
to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
\ No newline at end of file
+ 'c optionwrap2 ?handler f x y is similar to wrap but for binary functions.
Applicative
Alternatives
or_lazy ~else_ o is o if o is Some _, else_ () if o is None.
val return_if : bool -> 'a -> 'a treturn_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.
Infix Operators
module Infix : sig ... endinclude module type of Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
Conversion and IO
val to_list : 'a t -> 'a listto_list o returns [x] if o is Some x or the empty list [] if o is None.
val of_list : 'a list -> 'a tof_list l returns Some x (x being the head of the list l), or None if l is the empty list.
val to_result : 'e -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result e o returns Ok x if o is Some x, or Error e if o is None.
val to_result_lazy : ( unit -> 'e ) -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result_lazy f o returns Ok x if o is Some x or Error f if o is None.
val of_result : ( 'a, _ ) Stdlib.result -> 'a tof_result result returns an option from a result.
val random : 'a random_gen -> 'a t random_genchoice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.
choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.
to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
\ No newline at end of file
diff --git a/dev/containers/CCOption/Infix/index.html b/dev/containers/CCOption/Infix/index.html
index 56462c48..a41aee2b 100644
--- a/dev/containers/CCOption/Infix/index.html
+++ b/dev/containers/CCOption/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCOption.Infix) Module CCOption.Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
\ No newline at end of file
+Infix (containers.CCOption.Infix) Module CCOption.Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
\ No newline at end of file
diff --git a/dev/containers/CCOption/index.html b/dev/containers/CCOption/index.html
index eae609b2..4bd88c33 100644
--- a/dev/containers/CCOption/index.html
+++ b/dev/containers/CCOption/index.html
@@ -4,4 +4,4 @@
( 'a -> 'b -> 'c ) ->
'a ->
'b ->
- 'c optionwrap2 ?handler f x y is similar to wrap but for binary functions.
Applicative
Alternatives
or_lazy ~else_ o is o if o is Some _, else_ () if o is None.
val return_if : bool -> 'a -> 'a treturn_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.
Infix Operators
module Infix : sig ... endinclude module type of Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
Conversion and IO
val to_list : 'a t -> 'a listto_list o returns [x] if o is Some x or the empty list [] if o is None.
val of_list : 'a list -> 'a tof_list l returns Some x (x being the head of the list l), or None if l is the empty list.
val to_result : 'e -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result e o returns Ok x if o is Some x, or Error e if o is None.
val to_result_lazy : ( unit -> 'e ) -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result_lazy f o returns Ok x if o is Some x or Error f if o is None.
val of_result : ( 'a, _ ) Stdlib.result -> 'a tof_result result returns an option from a result.
val random : 'a random_gen -> 'a t random_genchoice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.
choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.
to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
\ No newline at end of file
+ 'c optionwrap2 ?handler f x y is similar to wrap but for binary functions.
Applicative
Alternatives
or_lazy ~else_ o is o if o is Some _, else_ () if o is None.
val return_if : bool -> 'a -> 'a treturn_if b x applies Some or None depending on the boolean b. More precisely, return_if false x is None, and return_if true x is Some x.
Infix Operators
module Infix : sig ... endinclude module type of Infix
f <*> o returns Some (f x) if o is Some x and None if o is None.
Conversion and IO
val to_list : 'a t -> 'a listto_list o returns [x] if o is Some x or the empty list [] if o is None.
val of_list : 'a list -> 'a tof_list l returns Some x (x being the head of the list l), or None if l is the empty list.
val to_result : 'e -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result e o returns Ok x if o is Some x, or Error e if o is None.
val to_result_lazy : ( unit -> 'e ) -> 'a t -> ( 'a, 'e ) Stdlib.resultto_result_lazy f o returns Ok x if o is Some x or Error f if o is None.
val of_result : ( 'a, _ ) Stdlib.result -> 'a tof_result result returns an option from a result.
val random : 'a random_gen -> 'a t random_genchoice_iter iter is similar to choice, but works on iter. It returns the first Some x occurring in iter, or None otherwise.
choice_seq seq works on Seq.t. It returns the first Some x occurring in seq, or None otherwise.
to_gen o is o as a gen. Some x is the singleton gen containing x and None is the empty gen.
val to_seq : 'a t -> 'a Stdlib.Seq.tto_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
\ No newline at end of file
diff --git a/dev/containers/CCResult/Infix/index.html b/dev/containers/CCResult/Infix/index.html
index e261b42d..997b9fe4 100644
--- a/dev/containers/CCResult/Infix/index.html
+++ b/dev/containers/CCResult/Infix/index.html
@@ -1,5 +1,2 @@
-Infix (containers.CCResult.Infix) Module CCResult.Infix
Infix version of map with reversed arguments.
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Let operators on OCaml >= 4.08.0, nothing otherwise
\ No newline at end of file
+Infix (containers.CCResult.Infix) Module CCResult.Infix
Infix version of map with reversed arguments.
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
\ No newline at end of file
diff --git a/dev/containers/CCResult/index.html b/dev/containers/CCResult/index.html
index 6d782a02..39291d81 100644
--- a/dev/containers/CCResult/index.html
+++ b/dev/containers/CCResult/index.html
@@ -10,10 +10,7 @@
( 'a -> 'b ) ->
( 'err1 -> 'err2 ) ->
( 'a, 'err1 ) t ->
- ( 'b, 'err2 ) tLike map, but also with a function that can transform the error message in case of failure.
val iter : ( 'a -> unit ) -> ( 'a, _ ) t -> unitApply the function only in case of Ok.
val iter_err : ( 'err -> unit ) -> ( _, 'err ) t -> unitApply the function in case of Error.
val get_exn : ( 'a, _ ) t -> 'aExtract the value x from Ok x, fails otherwise. You should be careful with this function, and favor other combinators whenever possible.
val get_or : ( 'a, _ ) t -> default:'a -> 'aget_or e ~default returns x if e = Ok x, default otherwise.
val get_or_failwith : ( 'a, string ) t -> 'aget_or_failwith e returns x if e = Ok x, fails otherwise.
val get_lazy : ( 'b -> 'a ) -> ( 'a, 'b ) t -> 'aget_lazy default_fn x unwraps x, but if x = Error e it returns default_fr e instead.
val map_or : ( 'a -> 'b ) -> ( 'a, 'c ) t -> default:'b -> 'bmap_or f e ~default returns f x if e = Ok x, default otherwise.
val catch : ( 'a, 'err ) t -> ok:( 'a -> 'b ) -> err:( 'err -> 'b ) -> 'bcatch e ~ok ~err calls either ok or err depending on the value of e.
val fold : ok:( 'a -> 'b ) -> error:( 'err -> 'b ) -> ( 'a, 'err ) t -> 'bfold ~ok ~error e opens e and, if e = Ok x, returns ok x, otherwise e = Error s and it returns error s.
val fold_ok : ( 'a -> 'b -> 'a ) -> 'a -> ( 'b, _ ) t -> 'afold_ok f acc r will compute f acc x if r=Ok x, and return acc otherwise, as if the result were a mere option.
val is_ok : ( 'a, 'err ) t -> boolReturn true if Ok.
val is_error : ( 'a, 'err ) t -> boolReturn true if Error.
Wrappers
val guard : ( unit -> 'a ) -> ( 'a, exn ) tguard f runs f () and returns its result wrapped in Ok. If f () raises some exception e, then it fails with Error e.
val guard_str : ( unit -> 'a ) -> ( 'a, string ) tval guard_str_trace : ( unit -> 'a ) -> ( 'a, string ) tLike guard_str but uses of_exn_trace instead of of_exn so that the stack trace is printed.
val wrap2 : ( 'a -> 'b -> 'c ) -> 'a -> 'b -> ( 'c, exn ) tLike guard but gives the function two arguments.
val wrap3 : ( 'a -> 'b -> 'c -> 'd ) -> 'a -> 'b -> 'c -> ( 'd, exn ) tLike guard but gives the function three arguments.
Applicative
join t, in case of success, returns Ok o from Ok (Ok o). Otherwise, it fails with Error e where e is the unwrapped error of t.
both a b, in case of success, returns Ok (o, o') with the ok values of a and b. Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Infix
module Infix : sig ... endinclude module type of Infix
Infix version of map with reversed arguments.
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Let operators on OCaml >= 4.08.0, nothing otherwise
Collections
Same as map_l id: returns Ok [x1;…;xn] if l=[Ok x1; …; Ok xn], or the first error otherwise.
map_l f [a1; …; an] applies the function f to a1, …, an ,and, in case of success for every element, returns the list of Ok-value. Otherwise, it fails and returns the first error encountered. Tail-recursive.
val fold_iter :
+ ( 'b, 'err2 ) tLike map, but also with a function that can transform the error message in case of failure.
val iter : ( 'a -> unit ) -> ( 'a, _ ) t -> unitApply the function only in case of Ok.
val iter_err : ( 'err -> unit ) -> ( _, 'err ) t -> unitApply the function in case of Error.
val get_exn : ( 'a, _ ) t -> 'aExtract the value x from Ok x, fails otherwise. You should be careful with this function, and favor other combinators whenever possible.
val get_or : ( 'a, _ ) t -> default:'a -> 'aget_or e ~default returns x if e = Ok x, default otherwise.
val get_or_failwith : ( 'a, string ) t -> 'aget_or_failwith e returns x if e = Ok x, fails otherwise.
val get_lazy : ( 'b -> 'a ) -> ( 'a, 'b ) t -> 'aget_lazy default_fn x unwraps x, but if x = Error e it returns default_fr e instead.
val map_or : ( 'a -> 'b ) -> ( 'a, 'c ) t -> default:'b -> 'bmap_or f e ~default returns f x if e = Ok x, default otherwise.
val catch : ( 'a, 'err ) t -> ok:( 'a -> 'b ) -> err:( 'err -> 'b ) -> 'bcatch e ~ok ~err calls either ok or err depending on the value of e.
val fold : ok:( 'a -> 'b ) -> error:( 'err -> 'b ) -> ( 'a, 'err ) t -> 'bfold ~ok ~error e opens e and, if e = Ok x, returns ok x, otherwise e = Error s and it returns error s.
val fold_ok : ( 'a -> 'b -> 'a ) -> 'a -> ( 'b, _ ) t -> 'afold_ok f acc r will compute f acc x if r=Ok x, and return acc otherwise, as if the result were a mere option.
val is_ok : ( 'a, 'err ) t -> boolReturn true if Ok.
val is_error : ( 'a, 'err ) t -> boolReturn true if Error.
Wrappers
val guard : ( unit -> 'a ) -> ( 'a, exn ) tguard f runs f () and returns its result wrapped in Ok. If f () raises some exception e, then it fails with Error e.
val guard_str : ( unit -> 'a ) -> ( 'a, string ) tval guard_str_trace : ( unit -> 'a ) -> ( 'a, string ) tLike guard_str but uses of_exn_trace instead of of_exn so that the stack trace is printed.
val wrap2 : ( 'a -> 'b -> 'c ) -> 'a -> 'b -> ( 'c, exn ) tLike guard but gives the function two arguments.
val wrap3 : ( 'a -> 'b -> 'c -> 'd ) -> 'a -> 'b -> 'c -> ( 'd, exn ) tLike guard but gives the function three arguments.
Applicative
join t, in case of success, returns Ok o from Ok (Ok o). Otherwise, it fails with Error e where e is the unwrapped error of t.
both a b, in case of success, returns Ok (o, o') with the ok values of a and b. Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Infix
module Infix : sig ... endinclude module type of Infix
Infix version of map with reversed arguments.
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Collections
Same as map_l id: returns Ok [x1;…;xn] if l=[Ok x1; …; Ok xn], or the first error otherwise.
map_l f [a1; …; an] applies the function f to a1, …, an ,and, in case of success for every element, returns the list of Ok-value. Otherwise, it fails and returns the first error encountered. Tail-recursive.
val fold_iter :
( 'b -> 'a -> ( 'b, 'err ) t ) ->
'b ->
'a iter ->
diff --git a/dev/containers/CCShimsArrayLabels_/.dummy b/dev/containers/CCShimsArrayLabels_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsArrayLabels_/Floatarray/index.html b/dev/containers/CCShimsArrayLabels_/Floatarray/index.html
deleted file mode 100644
index 863c6e50..00000000
--- a/dev/containers/CCShimsArrayLabels_/Floatarray/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Floatarray (containers.CCShimsArrayLabels_.Floatarray) Module CCShimsArrayLabels_.Floatarray
\ No newline at end of file
diff --git a/dev/containers/CCShimsArrayLabels_/index.html b/dev/containers/CCShimsArrayLabels_/index.html
deleted file mode 100644
index 83203da8..00000000
--- a/dev/containers/CCShimsArrayLabels_/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-CCShimsArrayLabels_ (containers.CCShimsArrayLabels_) Module CCShimsArrayLabels_
include module type of Stdlib.ArrayLabels
- with module Floatarray = Stdlib.Array.Floatarray
module Floatarray : sig ... end
\ No newline at end of file
diff --git a/dev/containers/CCShimsArray_/.dummy b/dev/containers/CCShimsArray_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsArray_/index.html b/dev/containers/CCShimsArray_/index.html
deleted file mode 100644
index 4ca745fd..00000000
--- a/dev/containers/CCShimsArray_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCShimsArray_ (containers.CCShimsArray_) Module CCShimsArray_
include module type of struct include Stdlib.Array end
\ No newline at end of file
diff --git a/dev/containers/CCShimsFormat_/.dummy b/dev/containers/CCShimsFormat_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsFormat_/index.html b/dev/containers/CCShimsFormat_/index.html
deleted file mode 100644
index 60f8ad40..00000000
--- a/dev/containers/CCShimsFormat_/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-CCShimsFormat_ (containers.CCShimsFormat_) Module CCShimsFormat_
\ No newline at end of file
diff --git a/dev/containers/CCShimsFun_/.dummy b/dev/containers/CCShimsFun_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsFun_/index.html b/dev/containers/CCShimsFun_/index.html
deleted file mode 100644
index 559a48fb..00000000
--- a/dev/containers/CCShimsFun_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCShimsFun_ (containers.CCShimsFun_) Module CCShimsFun_
\ No newline at end of file
diff --git a/dev/containers/CCShimsInt_/.dummy b/dev/containers/CCShimsInt_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsInt_/index.html b/dev/containers/CCShimsInt_/index.html
deleted file mode 100644
index 71cf86c2..00000000
--- a/dev/containers/CCShimsInt_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCShimsInt_ (containers.CCShimsInt_) Module CCShimsInt_
include module type of struct include Stdlib.Int end
\ No newline at end of file
diff --git a/dev/containers/CCShimsList_/.dummy b/dev/containers/CCShimsList_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsList_/index.html b/dev/containers/CCShimsList_/index.html
deleted file mode 100644
index ba57d7e7..00000000
--- a/dev/containers/CCShimsList_/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-CCShimsList_ (containers.CCShimsList_) Module CCShimsList_
include module type of struct include Stdlib.List end
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/.dummy b/dev/containers/CCShimsMkLetList_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html b/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html
deleted file mode 100644
index c07c7c4f..00000000
--- a/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-X (containers.CCShimsMkLetList_.Make.1-X) Parameter Make.1-X
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/Make/index.html b/dev/containers/CCShimsMkLetList_/Make/index.html
deleted file mode 100644
index a46f4055..00000000
--- a/dev/containers/CCShimsMkLetList_/Make/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Make (containers.CCShimsMkLetList_.Make) Module CCShimsMkLetList_.Make
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/index.html b/dev/containers/CCShimsMkLetList_/index.html
deleted file mode 100644
index 13b9f9bb..00000000
--- a/dev/containers/CCShimsMkLetList_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCShimsMkLetList_ (containers.CCShimsMkLetList_) Module CCShimsMkLetList_
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/module-type-S/index.html b/dev/containers/CCShimsMkLetList_/module-type-S/index.html
deleted file mode 100644
index 678ce4f1..00000000
--- a/dev/containers/CCShimsMkLetList_/module-type-S/index.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-S (containers.CCShimsMkLetList_.S) Module type CCShimsMkLetList_.S
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
- let+ x = xs
- and& y = ys
- and& z = zs in
- x + y + z;;
-val f : int list -> int list -> int list -> int list = <fun>
-# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/.dummy b/dev/containers/CCShimsMkLet_/.dummy
deleted file mode 100644
index e69de29b..00000000
diff --git a/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html b/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html
deleted file mode 100644
index 8075a7f0..00000000
--- a/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-X (containers.CCShimsMkLet_.Make.1-X) Parameter Make.1-X
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/Make/index.html b/dev/containers/CCShimsMkLet_/Make/index.html
deleted file mode 100644
index 75ed7439..00000000
--- a/dev/containers/CCShimsMkLet_/Make/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Make (containers.CCShimsMkLet_.Make) Module CCShimsMkLet_.Make
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/Make2/argument-1-X/index.html b/dev/containers/CCShimsMkLet_/Make2/argument-1-X/index.html
deleted file mode 100644
index a9d5235f..00000000
--- a/dev/containers/CCShimsMkLet_/Make2/argument-1-X/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-X (containers.CCShimsMkLet_.Make2.1-X) Parameter Make2.1-X
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/Make2/index.html b/dev/containers/CCShimsMkLet_/Make2/index.html
deleted file mode 100644
index d7f2564c..00000000
--- a/dev/containers/CCShimsMkLet_/Make2/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Make2 (containers.CCShimsMkLet_.Make2) Module CCShimsMkLet_.Make2
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/index.html b/dev/containers/CCShimsMkLet_/index.html
deleted file mode 100644
index de3da0d4..00000000
--- a/dev/containers/CCShimsMkLet_/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-CCShimsMkLet_ (containers.CCShimsMkLet_) Module CCShimsMkLet_
module type S = sig ... endglue code for let-operators on OCaml >= 4.08 (auto generated)
module type S2 = sig ... end
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/module-type-S/index.html b/dev/containers/CCShimsMkLet_/module-type-S/index.html
deleted file mode 100644
index 45cfc5d4..00000000
--- a/dev/containers/CCShimsMkLet_/module-type-S/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-S (containers.CCShimsMkLet_.S) Module type CCShimsMkLet_.S
glue code for let-operators on OCaml >= 4.08 (auto generated)
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/module-type-S2/index.html b/dev/containers/CCShimsMkLet_/module-type-S2/index.html
deleted file mode 100644
index e1c0afa2..00000000
--- a/dev/containers/CCShimsMkLet_/module-type-S2/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-S2 (containers.CCShimsMkLet_.S2) Module type CCShimsMkLet_.S2
\ No newline at end of file
diff --git a/dev/containers/CCMonomorphicShims_/.dummy b/dev/containers/CCShims_syntax/.dummy
similarity index 100%
rename from dev/containers/CCMonomorphicShims_/.dummy
rename to dev/containers/CCShims_syntax/.dummy
diff --git a/dev/containers/CCShims_syntax/index.html b/dev/containers/CCShims_syntax/index.html
new file mode 100644
index 00000000..7f3fbb8a
--- /dev/null
+++ b/dev/containers/CCShims_syntax/index.html
@@ -0,0 +1,2 @@
+
+CCShims_syntax (containers.CCShims_syntax) Module CCShims_syntax
module type LET = sig ... endLet operators on OCaml >= 4.08.0, nothing otherwise
\ No newline at end of file
diff --git a/dev/containers/CCShims_syntax/module-type-LET/index.html b/dev/containers/CCShims_syntax/module-type-LET/index.html
new file mode 100644
index 00000000..eb4bbf68
--- /dev/null
+++ b/dev/containers/CCShims_syntax/module-type-LET/index.html
@@ -0,0 +1,2 @@
+
+LET (containers.CCShims_syntax.LET) Module type CCShims_syntax.LET
Let operators on OCaml >= 4.08.0, nothing otherwise
\ No newline at end of file
diff --git a/dev/containers/CCVector/index.html b/dev/containers/CCVector/index.html
index 0dd482f4..c07476dc 100644
--- a/dev/containers/CCVector/index.html
+++ b/dev/containers/CCVector/index.html
@@ -14,4 +14,4 @@
?pp_stop:unit printer ->
?pp_sep:unit printer ->
'a printer ->
- ( 'a, _ ) t printerpp ~pp_start ~pp_stop ~pp_sep pp_item ppf v formats the vector v on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").
\ No newline at end of file
+ ( 'a, _ ) t printerpp ~pp_start ~pp_stop ~pp_sep pp_item ppf v formats the vector v on ppf. Each element is formatted with pp_item, pp_start is called at the beginning, pp_stop is called at the end, pp_sep is called between each elements. By defaults pp_start and pp_stop does nothing and pp_sep defaults to (fun out -> Format.fprintf out ",@ ").
\ No newline at end of file
diff --git a/dev/containers/index.html b/dev/containers/index.html
index 326bcce4..3ca18436 100644
--- a/dev/containers/index.html
+++ b/dev/containers/index.html
@@ -1,2 +1,2 @@
-index (containers.index) containers index
Library containers
This library exposes the following toplevel modules:
CCArray Array utilsCCArrayLabels Array utils (Labeled version of CCArray)CCAtomic CCBool Basic Bool functionsCCByte_buffer Byte buffer.CCCanonical_sexp Canonical S-expressionsCCChar Utils around charCCEither Either MonadCCEqual Equality CombinatorsCCEqualLabels Equality Combinators (Labeled version of CCEqual)CCFloat Basic operations on floating-point numbersCCFormat Helpers for FormatCCFun Basic operations on FunctionsCCHash Hash combinatorsCCHashtbl Extension to the standard HashtblCCHeap Leftist HeapsCCIO 1 IO UtilsCCInt Basic Int functionsCCInt32 Helpers for 32-bit integers.CCInt64 Helpers for 64-bit integers.CCList Complements to ListCCListLabels Complements to ListLabelsCCMap Extensions of Standard MapCCNativeint Helpers for processor-native integersCCOpt Previous Option moduleCCOption Basic operations on the option type.CCOrd Order combinatorsCCPair Tuple FunctionsCCParse Very Simple Parser CombinatorsCCRandom Random GeneratorsCCRef Helpers for referencesCCResult Error MonadCCSeq Helpers for the standard Seq typeCCSet Wrapper around SetCCSexp Handling S-expressionsCCSexp_intf CCSexp_lex CCShimsArrayLabels_ CCShimsArray_ CCShimsFormat_ CCShimsFun_ CCShimsInt_ CCShimsList_ CCShimsMkLetList_ CCShimsMkLet_ CCShims_ CCString Basic String UtilsCCStringLabels Basic String Utils (Labeled version of CCString)CCUnit CCUtf8_string Unicode String, in UTF8CCVector Growable, mutable vectorContainers Drop-In replacement to StdlibContainersLabels Drop-In replacement to Stdlib
Library containers.codegen
The entry point of this library is the module: Containers_codegen.
Library containers.monomorphic
This library exposes the following toplevel modules:
Library containers.top
The entry point of this library is the module: Containers_top.
Library containers.unix
The entry point of this library is the module: CCUnix.
\ No newline at end of file
+index (containers.index) containers index
Library containers
This library exposes the following toplevel modules:
CCArray Array utilsCCArrayLabels Array utils (Labeled version of CCArray)CCAtomic CCBool Basic Bool functionsCCByte_buffer Byte buffer.CCCanonical_sexp Canonical S-expressionsCCChar Utils around charCCEither Either MonadCCEqual Equality CombinatorsCCEqualLabels Equality Combinators (Labeled version of CCEqual)CCFloat Basic operations on floating-point numbersCCFormat Helpers for FormatCCFun Basic operations on FunctionsCCHash Hash combinatorsCCHashtbl Extension to the standard HashtblCCHeap Leftist HeapsCCIO 1 IO UtilsCCInt Basic Int functionsCCInt32 Helpers for 32-bit integers.CCInt64 Helpers for 64-bit integers.CCList Complements to ListCCListLabels Complements to ListLabelsCCMap Extensions of Standard MapCCNativeint Helpers for processor-native integersCCOpt Previous Option moduleCCOption Basic operations on the option type.CCOrd Order combinatorsCCPair Tuple FunctionsCCParse Very Simple Parser CombinatorsCCRandom Random GeneratorsCCRef Helpers for referencesCCResult Error MonadCCSeq Helpers for the standard Seq typeCCSet Wrapper around SetCCSexp Handling S-expressionsCCSexp_intf CCSexp_lex CCShims_ CCShims_syntax CCString Basic String UtilsCCStringLabels Basic String Utils (Labeled version of CCString)CCUnit CCUtf8_string Unicode String, in UTF8CCVector Growable, mutable vectorContainers Drop-In replacement to StdlibContainersLabels Drop-In replacement to Stdlib
Library containers.codegen
The entry point of this library is the module: Containers_codegen.
Library containers.monomorphic
The entry point of this library is the module: CCMonomorphic.
Library containers.top
The entry point of this library is the module: Containers_top.
Library containers.unix
The entry point of this library is the module: CCUnix.
\ No newline at end of file