BREAKING CHANGES since 1.2: size is now stored along with the bitvector. Some functions have a new signature.
The size of the bitvector used to be rounded up to the multiple of 30 or 62. In other words some functions such as iter would iterate on more bits than what was originally asked for. This is not the case anymore.
The bits are interpreted as indices into the returned bitvector, so the final bitvector bv will have length bv equal to 1 more than max of list indices.
select arr bv selects the elements of arr whose index corresponds to a true bit in bv. If bv is too short, elements of arr with too high an index cannot be selected and are therefore not selected.
\ No newline at end of file
+CCBV (containers-data.CCBV)
Module CCBV
Imperative Bitvectors
BREAKING CHANGES since 1.2: size is now stored along with the bitvector. Some functions have a new signature.
The size of the bitvector used to be rounded up to the multiple of 30 or 62. In other words some functions such as iter would iterate on more bits than what was originally asked for. This is not the case anymore.
The bits are interpreted as indices into the returned bitvector, so the final bitvector bv will have length bv equal to 1 more than max of list indices.
select arr bv selects the elements of arr whose index corresponds to a true bit in bv. If bv is too short, elements of arr with too high an index cannot be selected and are therefore not selected.
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/Make/argument-1-L/index.html b/dev/containers-data/CCBijection/Make/argument-1-L/index.html
index 7b944946..013b3f61 100644
--- a/dev/containers-data/CCBijection/Make/argument-1-L/index.html
+++ b/dev/containers-data/CCBijection/Make/argument-1-L/index.html
@@ -1,2 +1,2 @@
-1-L (containers-data.CCBijection.Make.1-L)
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/Make/argument-2-R/index.html b/dev/containers-data/CCBijection/Make/argument-2-R/index.html
index 06257585..f403e32b 100644
--- a/dev/containers-data/CCBijection/Make/argument-2-R/index.html
+++ b/dev/containers-data/CCBijection/Make/argument-2-R/index.html
@@ -1,2 +1,2 @@
-2-R (containers-data.CCBijection.Make.2-R)
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/Make/index.html b/dev/containers-data/CCBijection/Make/index.html
index 62c416a5..deff7b6f 100644
--- a/dev/containers-data/CCBijection/Make/index.html
+++ b/dev/containers-data/CCBijection/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCBijection.Make)
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/index.html b/dev/containers-data/CCBijection/index.html
index 6efcd9a4..542f9fc9 100644
--- a/dev/containers-data/CCBijection/index.html
+++ b/dev/containers-data/CCBijection/index.html
@@ -1,2 +1,2 @@
-CCBijection (containers-data.CCBijection)
Module CCBijection
Bijection
Represents 1-to-1 mappings between two types. Each element from the "left" is mapped to one "right" value, and conversely.
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/module-type-OrderedType/index.html b/dev/containers-data/CCBijection/module-type-OrderedType/index.html
index c88c2b89..54dde200 100644
--- a/dev/containers-data/CCBijection/module-type-OrderedType/index.html
+++ b/dev/containers-data/CCBijection/module-type-OrderedType/index.html
@@ -1,2 +1,2 @@
-OrderedType (containers-data.CCBijection.OrderedType)
\ No newline at end of file
diff --git a/dev/containers-data/CCBijection/module-type-S/index.html b/dev/containers-data/CCBijection/module-type-S/index.html
index 98863141..cd02a3ee 100644
--- a/dev/containers-data/CCBijection/module-type-S/index.html
+++ b/dev/containers-data/CCBijection/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCBijection.S)
\ No newline at end of file
diff --git a/dev/containers-data/CCBitField/Make/argument-1-_/index.html b/dev/containers-data/CCBitField/Make/argument-1-_/index.html
index 2d2f7ff9..7414bec9 100644
--- a/dev/containers-data/CCBitField/Make/argument-1-_/index.html
+++ b/dev/containers-data/CCBitField/Make/argument-1-_/index.html
@@ -1,2 +1,2 @@
-1-_ (containers-data.CCBitField.Make.1-_)
Parameter Make.1-_
\ No newline at end of file
+_ (containers-data.CCBitField.Make.1-_)
Parameter Make.1-_
\ No newline at end of file
diff --git a/dev/containers-data/CCBitField/Make/index.html b/dev/containers-data/CCBitField/Make/index.html
index 90ae7b53..266032ef 100644
--- a/dev/containers-data/CCBitField/Make/index.html
+++ b/dev/containers-data/CCBitField/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCBitField.Make)
Prevent new fields from being added. From now on, creating a field will raise Frozen.
val total_width : unit -> int
Current width of the bitfield.
\ No newline at end of file
diff --git a/dev/containers-data/CCBitField/index.html b/dev/containers-data/CCBitField/index.html
index 999a56c2..798f7ff2 100644
--- a/dev/containers-data/CCBitField/index.html
+++ b/dev/containers-data/CCBitField/index.html
@@ -1,5 +1,5 @@
-CCBitField (containers-data.CCBitField)
Module CCBitField
Bit Field
This module defines efficient bitfields up to 30 or 62 bits (depending on the architecture) in a relatively type-safe way.
module B = CCBitField.Make(struct end);;
+CCBitField (containers-data.CCBitField)
Module CCBitField
Bit Field
This module defines efficient bitfields up to 30 or 62 bits (depending on the architecture) in a relatively type-safe way.
module B = CCBitField.Make(struct end);;
let x = B.mk_field ()
let y = B.mk_field ()
@@ -9,4 +9,4 @@ let f = B.empty |> B.set x true |> B.set y true;;
assert (not (B.get z f)) ;;
-assert (f |> B.set z true |> B.get z);;
exceptionTooManyFields
Raised when too many fields are packed into one bitfield.
exceptionFrozen
Raised when a frozen bitfield is modified.
val max_width : int
System-dependent maximum width for a bitfield, typically 30 or 62.
\ No newline at end of file
diff --git a/dev/containers-data/CCBitField/module-type-S/index.html b/dev/containers-data/CCBitField/module-type-S/index.html
index 67ed18c8..6fe30057 100644
--- a/dev/containers-data/CCBitField/module-type-S/index.html
+++ b/dev/containers-data/CCBitField/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCBitField.S)
Module type CCBitField.S
Bitfield Signature
type t = private int
Generative type of bitfields. Each instantiation of the functor should create a new, incompatible type
Prevent new fields from being added. From now on, creating a field will raise Frozen.
val total_width : unit -> int
Current width of the bitfield.
\ No newline at end of file
diff --git a/dev/containers-data/CCCache/index.html b/dev/containers-data/CCCache/index.html
index 9626b802..663f2fbe 100644
--- a/dev/containers-data/CCCache/index.html
+++ b/dev/containers-data/CCCache/index.html
@@ -1,15 +1,15 @@
-CCCache (containers-data.CCCache)
Typical use case: one wants to memoize a function f : 'a -> 'b. Code sample:
let f x =
print_endline "call f";
x + 1;;
let f' = with_cache (lru 256) f;;
f' 0;; (* prints *)
f' 1;; (* prints *)
-f' 0;; (* doesn't print, returns cached value *)
type('a, 'b) callback = in_cache:bool->'a->'b-> unit
Type of the callback that is called once a cached value is found or not. Should never raise.
parameter in_cache
is true if the value was in cache, false if the value was just produced.
since
1.3
val with_cache : ?cb:('a, 'b)callback->('a, 'b)t->('a->'b)->'a->'b
with_cache c f behaves like f, but caches calls to f in the cache c. It always returns the same value as f x, if f x returns, or raise the same exception. However, f may not be called if x is in the cache.
parameter cb
called after the value is generated or retrieved.
val with_cache_rec : ?cb:('a, 'b)callback->('a, 'b)t->(('a->'b)->'a->'b)->'a->'b
with_cache_rec c f is a function that first, applies f to some f' = fix f, such that recursive calls to f' are cached in c. It is similar to with_cache but with a function that takes as first argument its own recursive version. Example (memoized Fibonacci function):
let fib = with_cache_rec (lru 256)
+f' 0;; (* doesn't print, returns cached value *)
type('a, 'b) callback = in_cache:bool ->'a->'b-> unit
Type of the callback that is called once a cached value is found or not. Should never raise.
parameterin_cache
is true if the value was in cache, false if the value was just produced.
since 1.3
val with_cache : ?cb:('a, 'b)callback->('a, 'b)t->('a->'b)->'a->'b
with_cache c f behaves like f, but caches calls to f in the cache c. It always returns the same value as f x, if f x returns, or raise the same exception. However, f may not be called if x is in the cache.
parametercb
called after the value is generated or retrieved.
val with_cache_rec : ?cb:('a, 'b)callback->('a, 'b)t->(('a->'b)->'a->'b)->'a->'b
with_cache_rec c f is a function that first, applies f to some f' = fix f, such that recursive calls to f' are cached in c. It is similar to with_cache but with a function that takes as first argument its own recursive version. Example (memoized Fibonacci function):
let fib = with_cache_rec (lru 256)
(fun fib' n -> match n with
| 1 | 2 -> 1
| _ -> fib' (n-1) + fib' (n-2)
);;
-fib 70;;
Linear cache with the given size. It stores key/value pairs in an array and does linear search at every call, so it should only be used with small size.
parameter eq
optional equality predicate for keys.
val replacing : eq:'aequal->?hash:'ahash-> int ->('a, 'b)t
Replacing cache of the given size. Equality and hash functions can be parametrized. It's a hash table that handles collisions by replacing the old value with the new (so a cache entry is evicted when another entry with the same hash (modulo size) is added). Never grows wider than the given size.
val lru : eq:'aequal->?hash:'ahash-> int ->('a, 'b)t
LRU cache of the given size ("Least Recently Used": keys that have not been used recently are deleted first). Never grows wider than the given size.
val unbounded : eq:'aequal->?hash:'ahash-> int ->('a, 'b)t
Unbounded cache, backed by a Hash table. Will grow forever unless clear is called manually.
Linear cache with the given size. It stores key/value pairs in an array and does linear search at every call, so it should only be used with small size.
parametereq
optional equality predicate for keys.
val replacing : eq:'aequal->?hash:'ahash->int ->('a, 'b)t
Replacing cache of the given size. Equality and hash functions can be parametrized. It's a hash table that handles collisions by replacing the old value with the new (so a cache entry is evicted when another entry with the same hash (modulo size) is added). Never grows wider than the given size.
val lru : eq:'aequal->?hash:'ahash->int ->('a, 'b)t
LRU cache of the given size ("Least Recently Used": keys that have not been used recently are deleted first). Never grows wider than the given size.
val unbounded : eq:'aequal->?hash:'ahash->int ->('a, 'b)t
Unbounded cache, backed by a Hash table. Will grow forever unless clear is called manually.
\ No newline at end of file
diff --git a/dev/containers-data/CCDeque/index.html b/dev/containers-data/CCDeque/index.html
index 6f635fbf..e8da8a15 100644
--- a/dev/containers-data/CCDeque/index.html
+++ b/dev/containers-data/CCDeque/index.html
@@ -1,2 +1,2 @@
-CCDeque (containers-data.CCDeque)
Module CCDeque
Imperative deque
This structure provides fast access to its front and back elements, with O(1) operations.
Update last value. If the deque is empty do nothing. If the function returns None, remove last element; if it returns Some x, replace last element with x.
Update last value. If the deque is empty do nothing. If the function returns None, remove last element; if it returns Some x, replace last element with x.
\ No newline at end of file
diff --git a/dev/containers-data/CCFQueue/index.html b/dev/containers-data/CCFQueue/index.html
index 61096acb..0a8786f9 100644
--- a/dev/containers-data/CCFQueue/index.html
+++ b/dev/containers-data/CCFQueue/index.html
@@ -1,2 +1,2 @@
-CCFQueue (containers-data.CCFQueue)
Module CCFQueue
Functional queues
type'a iter = ('a-> unit)-> unit
type'a equal = 'a->'a-> bool
type'a printer = Stdlib.Format.formatter ->'a-> unit
take_back_l n q removes and returns the last n elements of q. The elements are in the order of the queue, that is, the head of the returned list is the first element to appear via take_front. take_back_l 2 (of_list [1;2;3;4]) = of_list [1;2], [3;4].
raises Invalid_argument
if n<0.
val take_back_while : ('a-> bool)->'at->'at * 'a list
take_back_l n q removes and returns the last n elements of q. The elements are in the order of the queue, that is, the head of the returned list is the first element to appear via take_front. take_back_l 2 (of_list [1;2;3;4]) = of_list [1;2], [3;4].
raisesInvalid_argument
if n<0.
val take_back_while : ('a-> bool)->'at->'at * 'a list
\ No newline at end of file
diff --git a/dev/containers-data/CCFun_vec/index.html b/dev/containers-data/CCFun_vec/index.html
index 640c598a..78f1b6b8 100644
--- a/dev/containers-data/CCFun_vec/index.html
+++ b/dev/containers-data/CCFun_vec/index.html
@@ -1,2 +1,2 @@
-CCFun_vec (containers-data.CCFun_vec)
Module CCFun_vec
Functional Vectors
type'a iter = ('a-> unit)-> unit
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Dot/index.html b/dev/containers-data/CCGraph/Dot/index.html
index aa18ad29..d9547c7d 100644
--- a/dev/containers-data/CCGraph/Dot/index.html
+++ b/dev/containers-data/CCGraph/Dot/index.html
@@ -1,2 +1,6 @@
-Dot (containers-data.CCGraph.Dot)
Module CCGraph.Dot
type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Other of string * string
]
Dot attribute
type vertex_state
Hidden state associated to a vertex
val pp : tbl:('v, vertex_state)table->eq:('v->'v-> bool)->?attrs_v:('v->attribute list)->?attrs_e:('e->attribute list)->?name:string->graph:('v, 'e)t-> Stdlib.Format.formatter ->'v-> unit
Print the graph, starting from given vertex, on the formatter.
parameter attrs_v
attributes for vertices.
parameter attrs_e
attributes for edges.
parameter name
name of the graph.
val pp_all : tbl:('v, vertex_state)table->eq:('v->'v-> bool)->?attrs_v:('v->attribute list)->?attrs_e:('e->attribute list)->?name:string->graph:('v, 'e)t-> Stdlib.Format.formatter ->'viter-> unit
Same as pp but starting from several vertices, not just one.
since
2.8
val with_out : string ->(Stdlib.Format.formatter ->'a)->'a
Shortcut to open a file and write to it.
\ No newline at end of file
+Dot (containers-data.CCGraph.Dot)
Module CCGraph.Dot
type attribute = [
| `Color of string
| `Shape of string
| `Weight of int
| `Style of string
| `Label of string
| `Other of string * string
]
Dot attribute
type vertex_state
Hidden state associated to a vertex
val pp : tbl:('v, vertex_state)table->eq:('v->'v-> bool)->?attrs_v:('v->attribute list)->
+?attrs_e:('e->attribute list)->?name:string ->graph:('v, 'e)t->
+Stdlib.Format.formatter ->'v-> unit
Print the graph, starting from given vertex, on the formatter.
parameterattrs_v
attributes for vertices.
parameterattrs_e
attributes for edges.
parametername
name of the graph.
val pp_all : tbl:('v, vertex_state)table->eq:('v->'v-> bool)->?attrs_v:('v->attribute list)->
+?attrs_e:('e->attribute list)->?name:string ->graph:('v, 'e)t->
+Stdlib.Format.formatter ->'viter-> unit
Same as pp but starting from several vertices, not just one.
since 2.8
val with_out : string ->(Stdlib.Format.formatter ->'a)->'a
Shortcut to open a file and write to it.
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Iter/index.html b/dev/containers-data/CCGraph/Iter/index.html
index def06126..8964328d 100644
--- a/dev/containers-data/CCGraph/Iter/index.html
+++ b/dev/containers-data/CCGraph/Iter/index.html
@@ -1,2 +1,2 @@
-Iter (containers-data.CCGraph.Iter)
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Lazy_tree/index.html b/dev/containers-data/CCGraph/Lazy_tree/index.html
index 91bd603f..086fb9b3 100644
--- a/dev/containers-data/CCGraph/Lazy_tree/index.html
+++ b/dev/containers-data/CCGraph/Lazy_tree/index.html
@@ -1,2 +1,2 @@
-Lazy_tree (containers-data.CCGraph.Lazy_tree)
val fold_v : ('acc->'v->'acc)->'acc->('v, _)t->'acc
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Map/index.html b/dev/containers-data/CCGraph/Map/index.html
index aa999c14..819ecce0 100644
--- a/dev/containers-data/CCGraph/Map/index.html
+++ b/dev/containers-data/CCGraph/Map/index.html
@@ -1,2 +1,2 @@
-Map (containers-data.CCGraph.Map)
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Traverse/Event/index.html b/dev/containers-data/CCGraph/Traverse/Event/index.html
index d206cc78..84d441e0 100644
--- a/dev/containers-data/CCGraph/Traverse/Event/index.html
+++ b/dev/containers-data/CCGraph/Traverse/Event/index.html
@@ -1,2 +1,2 @@
-Event (containers-data.CCGraph.Traverse.Event)
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/Traverse/index.html b/dev/containers-data/CCGraph/Traverse/index.html
index be18c00c..9a265849 100644
--- a/dev/containers-data/CCGraph/Traverse/index.html
+++ b/dev/containers-data/CCGraph/Traverse/index.html
@@ -1,2 +1,4 @@
-Traverse (containers-data.CCGraph.Traverse)
Traversal of the given graph, starting from a sequence of vertices, using the given bag to choose the next vertex to explore. Each vertex is visited at most once.
val dijkstra : tbl:'vset->?dist:('e-> int)->graph:('v, 'e)t->'viter->('v * int * ('v, 'e)path)iter_once
Dijkstra algorithm, traverses a graph in increasing distance order. Yields each vertex paired with its distance to the set of initial vertices (the smallest distance needed to reach the node from the initial vertices).
parameter dist
distance from origin of the edge to destination, must be strictly positive. Default is 1 for every edge.
val dijkstra_tag : ?dist:('e-> int)->tags:'vtag_set->graph:('v, 'e)t->'viter->('v * int * ('v, 'e)path)iter_once
Traversal of the given graph, starting from a sequence of vertices, using the given bag to choose the next vertex to explore. Each vertex is visited at most once.
val dijkstra : tbl:'vset->?dist:('e-> int)->graph:('v, 'e)t->
+'viter->('v * int * ('v, 'e)path)iter_once
Dijkstra algorithm, traverses a graph in increasing distance order. Yields each vertex paired with its distance to the set of initial vertices (the smallest distance needed to reach the node from the initial vertices).
parameterdist
distance from origin of the edge to destination, must be strictly positive. Default is 1 for every edge.
val dijkstra_tag : ?dist:('e-> int)->tags:'vtag_set->graph:('v, 'e)t->
+'viter->('v * int * ('v, 'e)path)iter_once
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/index.html b/dev/containers-data/CCGraph/index.html
index 3c8bb06f..afb5ff4a 100644
--- a/dev/containers-data/CCGraph/index.html
+++ b/dev/containers-data/CCGraph/index.html
@@ -1,7 +1,9 @@
-CCGraph (containers-data.CCGraph)
Module CCGraph
Simple Graph Interface
A collections of algorithms on (mostly read-only) graph structures. The user provides her own graph structure as a ('v, 'e) CCGraph.t, where 'v is the type of vertices and 'e the type of edges (for instance, 'e = ('v * 'v) is perfectly fine in many cases).
Such a ('v, 'e) CCGraph.t structure is a record containing three functions: two relate edges to their origin and destination, and one maps vertices to their outgoing edges. This abstract notion of graph makes it possible to run the algorithms on any user-specific type that happens to have a graph structure.
Many graph algorithms here take an iterator of vertices as input. The helper module Iter contains basic functions for that, as does the iter library on opam. If the user only has a single vertex (e.g., for a topological sort from a given vertex), they can use Iter.return x to build a iter of one element.
val is_dag : tbl:'vset->eq:('v->'v-> bool)->graph:('v, _)t->'viter-> bool
is_dag ~graph vs returns true if the subset of graph reachable from vs is acyclic.
since
0.18
Topological Sort
exceptionHas_cycle
val topo_sort : eq:('v->'v-> bool)->?rev:bool->tbl:'vset->graph:('v, 'e)t->'viter->'v list
topo_sort ~graph seq returns a list of vertices l where each element of l is reachable from seq. The list is sorted in a way such that if v -> v' in the graph, then v comes before v' in the list (i.e. has a smaller index). Basically v -> v' means that v is smaller than v'. See wikipedia.
parameter eq
equality predicate on vertices (default (=)).
parameter rev
if true, the dependency relation is inverted (v -> v' means v' occurs before v).
raises Has_cycle
if the graph is not a DAG.
val topo_sort_tag : eq:('v->'v-> bool)->?rev:bool->tags:'vtag_set->graph:('v, 'e)t->'viter->'v list
Strongly connected components reachable from the given vertices. Each component is a list of vertices that are all mutually reachable in the graph. The components are explored in a topological order (if C1 and C2 are components, and C1 points to C2, then C2 will be yielded before C1). Uses Tarjan's algorithm.
parameter tbl
table used to map nodes to some hidden state.
raises Iter_once
if the result is iterated on more than once.
Pretty printing in the DOT (graphviz) format
Example (print divisors from 42):
let open CCGraph in
+CCGraph (containers-data.CCGraph)
Module CCGraph
Simple Graph Interface
A collections of algorithms on (mostly read-only) graph structures. The user provides her own graph structure as a ('v, 'e) CCGraph.t, where 'v is the type of vertices and 'e the type of edges (for instance, 'e = ('v * 'v) is perfectly fine in many cases).
Such a ('v, 'e) CCGraph.t structure is a record containing three functions: two relate edges to their origin and destination, and one maps vertices to their outgoing edges. This abstract notion of graph makes it possible to run the algorithms on any user-specific type that happens to have a graph structure.
Many graph algorithms here take an iterator of vertices as input. The helper module Iter contains basic functions for that, as does the iter library on opam. If the user only has a single vertex (e.g., for a topological sort from a given vertex), they can use Iter.return x to build a iter of one element.
val is_dag : tbl:'vset->eq:('v->'v-> bool)->graph:('v, _)t->'viter-> bool
is_dag ~graph vs returns true if the subset of graph reachable from vs is acyclic.
since 0.18
Topological Sort
exceptionHas_cycle
val topo_sort : eq:('v->'v-> bool)->?rev:bool ->tbl:'vset->graph:('v, 'e)t->
+'viter->'v list
topo_sort ~graph seq returns a list of vertices l where each element of l is reachable from seq. The list is sorted in a way such that if v -> v' in the graph, then v comes before v' in the list (i.e. has a smaller index). Basically v -> v' means that v is smaller than v'. See wikipedia.
parametereq
equality predicate on vertices (default (=)).
parameterrev
if true, the dependency relation is inverted (v -> v' means v' occurs before v).
raisesHas_cycle
if the graph is not a DAG.
val topo_sort_tag : eq:('v->'v-> bool)->?rev:bool ->tags:'vtag_set->graph:('v, 'e)t->
+'viter->'v list
Strongly connected components reachable from the given vertices. Each component is a list of vertices that are all mutually reachable in the graph. The components are explored in a topological order (if C1 and C2 are components, and C1 points to C2, then C2 will be yielded before C1). Uses Tarjan's algorithm.
parametertbl
table used to map nodes to some hidden state.
raisesIter_once
if the result is iterated on more than once.
Pretty printing in the DOT (graphviz) format
Example (print divisors from 42):
let open CCGraph in
let open Dot in
with_out "/tmp/truc.dot"
(fun out ->
pp ~attrs_v:(fun i -> [`Label (string_of_int i)]) ~graph:divisors_graph out 42
- )
val mk_mut_tbl : eq:('v->'v-> bool)->?hash:('v-> int)-> int ->('v, 'a)mut_graph
Make a new mutable graph from a Hashtbl. Edges are labelled with type 'a.
Immutable Graph
A classic implementation of a graph structure on totally ordered vertices, with unlabelled edges. The graph allows to add and remove edges and vertices, and to iterate on edges and vertices.
val mk_mut_tbl : eq:('v->'v-> bool)->?hash:('v-> int)->int ->('v, 'a)mut_graph
Make a new mutable graph from a Hashtbl. Edges are labelled with type 'a.
Immutable Graph
A classic implementation of a graph structure on totally ordered vertices, with unlabelled edges. The graph allows to add and remove edges and vertices, and to iterate on edges and vertices.
\ No newline at end of file
diff --git a/dev/containers-data/CCGraph/module-type-MAP/index.html b/dev/containers-data/CCGraph/module-type-MAP/index.html
index bba846a7..eea615a7 100644
--- a/dev/containers-data/CCGraph/module-type-MAP/index.html
+++ b/dev/containers-data/CCGraph/module-type-MAP/index.html
@@ -1,2 +1,2 @@
-MAP (containers-data.CCGraph.MAP)
\ No newline at end of file
diff --git a/dev/containers-data/CCHashSet/Make/argument-1-E/index.html b/dev/containers-data/CCHashSet/Make/argument-1-E/index.html
index 5e9d58f4..5ec8b8eb 100644
--- a/dev/containers-data/CCHashSet/Make/argument-1-E/index.html
+++ b/dev/containers-data/CCHashSet/Make/argument-1-E/index.html
@@ -1,2 +1,2 @@
-1-E (containers-data.CCHashSet.Make.1-E)
\ No newline at end of file
diff --git a/dev/containers-data/CCHashSet/Make/index.html b/dev/containers-data/CCHashSet/Make/index.html
index 1cd9dc92..23d3a20c 100644
--- a/dev/containers-data/CCHashSet/Make/index.html
+++ b/dev/containers-data/CCHashSet/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCHashSet.Make)
pp pp_elt returns a set printer, given a printer for individual elements.
\ No newline at end of file
diff --git a/dev/containers-data/CCHashSet/index.html b/dev/containers-data/CCHashSet/index.html
index 48bfab49..5da846e3 100644
--- a/dev/containers-data/CCHashSet/index.html
+++ b/dev/containers-data/CCHashSet/index.html
@@ -1,2 +1,2 @@
-CCHashSet (containers-data.CCHashSet)
Module CCHashSet
Mutable Set
status: unstable
since
0.13
type'a iter = ('a-> unit)-> unit
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html b/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html
index 8c29c4c9..52a43cb6 100644
--- a/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html
+++ b/dev/containers-data/CCHashSet/module-type-ELEMENT/index.html
@@ -1,2 +1,2 @@
-ELEMENT (containers-data.CCHashSet.ELEMENT)
\ No newline at end of file
diff --git a/dev/containers-data/CCHashSet/module-type-S/index.html b/dev/containers-data/CCHashSet/module-type-S/index.html
index f0c95267..e5f4a9da 100644
--- a/dev/containers-data/CCHashSet/module-type-S/index.html
+++ b/dev/containers-data/CCHashSet/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCHashSet.S)
pp pp_elt returns a set printer, given a printer for individual elements.
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html b/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html
index e345fcd6..127a4d38 100644
--- a/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html
+++ b/dev/containers-data/CCHashTrie/Make/argument-1-K/index.html
@@ -1,2 +1,2 @@
-1-K (containers-data.CCHashTrie.Make.1-K)
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/Make/index.html b/dev/containers-data/CCHashTrie/Make/index.html
index 5e94b1e1..ec8b25ff 100644
--- a/dev/containers-data/CCHashTrie/Make/index.html
+++ b/dev/containers-data/CCHashTrie/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCHashTrie.Make)
add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
val as_tree : 'at->[ `L of int * (key * 'a) list| `N ]ktree
For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/Transient/index.html b/dev/containers-data/CCHashTrie/Transient/index.html
index d6a2c588..8ce1876c 100644
--- a/dev/containers-data/CCHashTrie/Transient/index.html
+++ b/dev/containers-data/CCHashTrie/Transient/index.html
@@ -1,2 +1,2 @@
-Transient (containers-data.CCHashTrie.Transient)
Module CCHashTrie.Transient
Transient Identifiers
type t
Identifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.
with_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.
exceptionFrozen
Raised when a frozen ID is used.
\ No newline at end of file
+Transient (containers-data.CCHashTrie.Transient)
Module CCHashTrie.Transient
Transient Identifiers
type t
Identifiers for transient modifications. A transient modification is uniquely identified by a Transient.t. Once Transient.freeze r is called, r cannot be used to modify the structure again.
with_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.
exceptionFrozen
Raised when a frozen ID is used.
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/index.html b/dev/containers-data/CCHashTrie/index.html
index 5439d36c..e0115305 100644
--- a/dev/containers-data/CCHashTrie/index.html
+++ b/dev/containers-data/CCHashTrie/index.html
@@ -1,2 +1,2 @@
-CCHashTrie (containers-data.CCHashTrie)
Module CCHashTrie
Hash Tries
Trie indexed by the hash of the keys, where the branching factor is fixed. The goal is to have a quite efficient functional structure with fast update and access if the hash function is good. The trie is not binary, to improve cache locality and decrease depth.
Preliminary benchmarks (see the "tbl" section of benchmarks) tend to show that this type is quite efficient for small data sets.
status: unstable
since
0.13
type'a iter = ('a-> unit)-> unit
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
\ No newline at end of file
+CCHashTrie (containers-data.CCHashTrie)
Module CCHashTrie
Hash Tries
Trie indexed by the hash of the keys, where the branching factor is fixed. The goal is to have a quite efficient functional structure with fast update and access if the hash function is good. The trie is not binary, to improve cache locality and decrease depth.
Preliminary benchmarks (see the "tbl" section of benchmarks) tend to show that this type is quite efficient for small data sets.
status: unstable
since 0.13
type'a iter = ('a-> unit)-> unit
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/module-type-KEY/index.html b/dev/containers-data/CCHashTrie/module-type-KEY/index.html
index 3c12df03..c5b0488a 100644
--- a/dev/containers-data/CCHashTrie/module-type-KEY/index.html
+++ b/dev/containers-data/CCHashTrie/module-type-KEY/index.html
@@ -1,2 +1,2 @@
-KEY (containers-data.CCHashTrie.KEY)
\ No newline at end of file
diff --git a/dev/containers-data/CCHashTrie/module-type-S/index.html b/dev/containers-data/CCHashTrie/module-type-S/index.html
index 33a97be2..59aca12e 100644
--- a/dev/containers-data/CCHashTrie/module-type-S/index.html
+++ b/dev/containers-data/CCHashTrie/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCHashTrie.S)
add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
add_mut ~id k v m behaves like add k v m, except it will mutate in place whenever possible. Changes done with an id might affect all versions of the structure obtained with the same id (but not other versions).
val as_tree : 'at->[ `L of int * (key * 'a) list| `N ]ktree
For debugging purpose: explore the structure of the tree, with `L (h,l) being a leaf (with shared hash h) and `N an inner node.
\ No newline at end of file
diff --git a/dev/containers-data/CCHet/Key/index.html b/dev/containers-data/CCHet/Key/index.html
index c2e6d4a4..b4e3c995 100644
--- a/dev/containers-data/CCHet/Key/index.html
+++ b/dev/containers-data/CCHet/Key/index.html
@@ -1,2 +1,2 @@
-Key (containers-data.CCHet.Key)
\ No newline at end of file
diff --git a/dev/containers-data/CCHet/Map/index.html b/dev/containers-data/CCHet/Map/index.html
index 5399d5f6..c8b00834 100644
--- a/dev/containers-data/CCHet/Map/index.html
+++ b/dev/containers-data/CCHet/Map/index.html
@@ -1,2 +1,2 @@
-Map (containers-data.CCHet.Map)
\ No newline at end of file
diff --git a/dev/containers-data/CCHet/Tbl/index.html b/dev/containers-data/CCHet/Tbl/index.html
index 66ee60c0..f35a1e2c 100644
--- a/dev/containers-data/CCHet/Tbl/index.html
+++ b/dev/containers-data/CCHet/Tbl/index.html
@@ -1,2 +1,2 @@
-Tbl (containers-data.CCHet.Tbl)
\ No newline at end of file
diff --git a/dev/containers-data/CCHet/index.html b/dev/containers-data/CCHet/index.html
index e013bff6..4a34be79 100644
--- a/dev/containers-data/CCHet/index.html
+++ b/dev/containers-data/CCHet/index.html
@@ -1,2 +1,2 @@
-CCHet (containers-data.CCHet)
Module CCHet
Associative containers with Heterogeneous Values
This is similar to CCMixtbl, but the injection is directly used as a key.
\ No newline at end of file
diff --git a/dev/containers-data/CCImmutArray/index.html b/dev/containers-data/CCImmutArray/index.html
index 4f941b6c..28bc6bcb 100644
--- a/dev/containers-data/CCImmutArray/index.html
+++ b/dev/containers-data/CCImmutArray/index.html
@@ -1,2 +1,2 @@
-CCImmutArray (containers-data.CCImmutArray)
Module CCImmutArray
Immutable Arrays
Purely functional use of arrays. Update is costly, but reads are very fast. Sadly, it is not possible to make this type covariant without using black magic.
since
0.17
type'a t
Array of values of type 'a. The underlying type really is an array, but it will never be modified.
It should be covariant but OCaml will not accept it.
sub a start len returns a fresh array of length len, containing the elements from start to pstart + len - 1 of array a.
Raises Invalid_argument "Array.sub" if start and len do not designate a valid subarray of a; that is, if start < 0, or len < 0, or start + len > Array.length a.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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
+CCImmutArray (containers-data.CCImmutArray)
Module CCImmutArray
Immutable Arrays
Purely functional use of arrays. Update is costly, but reads are very fast. Sadly, it is not possible to make this type covariant without using black magic.
since 0.17
type'a t
Array of values of type 'a. The underlying type really is an array, but it will never be modified.
It should be covariant but OCaml will not accept it.
sub a start len returns a fresh array of length len, containing the elements from start to pstart + len - 1 of array a.
Raises Invalid_argument "Array.sub" if start and len do not designate a valid subarray of a; that is, if start < 0, or len < 0, or start + len > Array.length a.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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-data/CCIntMap/index.html b/dev/containers-data/CCIntMap/index.html
index 80ba180e..3953a53f 100644
--- a/dev/containers-data/CCIntMap/index.html
+++ b/dev/containers-data/CCIntMap/index.html
@@ -1,2 +1,3 @@
-CCIntMap (containers-data.CCIntMap)
val merge : f:(int ->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)->'at->'bt->'ct
merge ~f m1 m2 merges m1 and m2 together, calling f once on every key that occurs in at least one of m1 and m2. if f k binding = Some c then k -> c is part of the result, else k is not part of the result.
val merge : f:(int ->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)
+->'at->'bt->'ct
merge ~f m1 m2 merges m1 and m2 together, calling f once on every key that occurs in at least one of m1 and m2. if f k binding = Some c then k -> c is part of the result, else k is not part of the result.
\ No newline at end of file
diff --git a/dev/containers-data/CCKTree/Dot/index.html b/dev/containers-data/CCKTree/Dot/index.html
index bbe4c720..a9858ac7 100644
--- a/dev/containers-data/CCKTree/Dot/index.html
+++ b/dev/containers-data/CCKTree/Dot/index.html
@@ -1,2 +1,2 @@
-Dot (containers-data.CCKTree.Dot)
print_to_file filename g prints g into a file whose name is filename.
since 0.6.1
val to_file : ?name:string ->string ->attribute listt list-> unit
to_file filename trees makes a graph out of the trees, opens the file filename and prints the graph into the file.
parametername
name of the graph.
since 0.6.1
\ No newline at end of file
diff --git a/dev/containers-data/CCKTree/class-type-pset/index.html b/dev/containers-data/CCKTree/class-type-pset/index.html
index b43a8cd4..e8a55e41 100644
--- a/dev/containers-data/CCKTree/class-type-pset/index.html
+++ b/dev/containers-data/CCKTree/class-type-pset/index.html
@@ -1,2 +1,2 @@
-pset (containers-data.CCKTree.pset)
\ No newline at end of file
diff --git a/dev/containers-data/CCKTree/index.html b/dev/containers-data/CCKTree/index.html
index be6414c6..f190d528 100644
--- a/dev/containers-data/CCKTree/index.html
+++ b/dev/containers-data/CCKTree/index.html
@@ -1,5 +1,5 @@
-CCKTree (containers-data.CCKTree)
Module CCKTree
Lazy Tree Structure
This structure can be used to represent trees and directed graphs (as infinite trees) in a lazy fashion. Like CCKList, it is a structural type.
type'a iter = ('a-> unit)-> unit
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
Basics
type+'a t = unit ->[ `Nil | `Node of 'a * 'at list ]
val force : 'at->[ `Nil | `Node of 'a * 'b list ]as 'b
force t evaluates t completely and returns a regular tree structure.
since 0.13
val find : pset:'apset->('a->'b option)->'at->'b option
Look for an element that maps to Some _.
Pretty-printing
Example (tree of calls for naive Fibonacci function):
let mk_fib n =
let rec fib' l r i =
if i=n then r else fib' r (l+r) (i+1)
in fib' 1 1 1;;
@@ -12,4 +12,4 @@ let pp_node fmt = function
| `Cst n -> Format.fprintf fmt "%d" n
| `Plus n -> Format.fprintf fmt "%d" n;;
-Format.printf "%a@." (CCKTree.pp pp_node) (fib 8);;
\ No newline at end of file
diff --git a/dev/containers-data/CCLazy_list/Infix/index.html b/dev/containers-data/CCLazy_list/Infix/index.html
index 2d9a4b69..1bf38dba 100644
--- a/dev/containers-data/CCLazy_list/Infix/index.html
+++ b/dev/containers-data/CCLazy_list/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers-data.CCLazy_list.Infix)
\ No newline at end of file
diff --git a/dev/containers-data/CCLazy_list/index.html b/dev/containers-data/CCLazy_list/index.html
index f01e3adc..dbe4106a 100644
--- a/dev/containers-data/CCLazy_list/index.html
+++ b/dev/containers-data/CCLazy_list/index.html
@@ -1,2 +1,2 @@
-CCLazy_list (containers-data.CCLazy_list)
\ No newline at end of file
diff --git a/dev/containers-data/CCMixmap/Make/argument-1-X/index.html b/dev/containers-data/CCMixmap/Make/argument-1-X/index.html
index 9234f224..8b4793de 100644
--- a/dev/containers-data/CCMixmap/Make/argument-1-X/index.html
+++ b/dev/containers-data/CCMixmap/Make/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCMixmap.Make.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCMixmap/Make/index.html b/dev/containers-data/CCMixmap/Make/index.html
index a5686559..bf19f0ae 100644
--- a/dev/containers-data/CCMixmap/Make/index.html
+++ b/dev/containers-data/CCMixmap/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCMixmap.Make)
\ No newline at end of file
diff --git a/dev/containers-data/CCMixmap/index.html b/dev/containers-data/CCMixmap/index.html
index e1c0fdba..14a14552 100644
--- a/dev/containers-data/CCMixmap/index.html
+++ b/dev/containers-data/CCMixmap/index.html
@@ -1,5 +1,5 @@
-CCMixmap (containers-data.CCMixmap)
Module CCMixmap
Maps with Heterogeneous Values
status: experimental
module M = CCMixmap.Make(CCInt)
+CCMixmap (containers-data.CCMixmap)
Module CCMixmap
Maps with Heterogeneous Values
status: experimental
module M = CCMixmap.Make(CCInt)
let inj_int = CCMixmap.create_inj()
let inj_str = CCMixmap.create_inj()
@@ -16,4 +16,4 @@ let m =
assert (M.get ~inj:inj_str 2 m = Some "2")
assert (M.get ~inj:inj_int 2 m = None)
assert (M.get ~inj:inj_list_int 3 m = Some [3;3;3])
- assert (M.get ~inj:inj_str 3 m = None)
change of API, the map is last argument to make piping with |> easier since 0.16.
since
0.9
type'a injection
An accessor for values of type 'a in any map. Values put in the map using a key can only be retrieved using this very same key.
Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple maps (although not in a thread-safe way).
Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple maps (although not in a thread-safe way).
\ No newline at end of file
diff --git a/dev/containers-data/CCMixmap/module-type-ORD/index.html b/dev/containers-data/CCMixmap/module-type-ORD/index.html
index c4a1971e..f78a9c65 100644
--- a/dev/containers-data/CCMixmap/module-type-ORD/index.html
+++ b/dev/containers-data/CCMixmap/module-type-ORD/index.html
@@ -1,2 +1,2 @@
-ORD (containers-data.CCMixmap.ORD)
\ No newline at end of file
diff --git a/dev/containers-data/CCMixmap/module-type-S/index.html b/dev/containers-data/CCMixmap/module-type-S/index.html
index ceb35d6a..f60ab2e6 100644
--- a/dev/containers-data/CCMixmap/module-type-S/index.html
+++ b/dev/containers-data/CCMixmap/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCMixmap.S)
Module type CCMixmap.S
type key
type t
A map containing values of different types, indexed by key.
\ No newline at end of file
diff --git a/dev/containers-data/CCMixset/index.html b/dev/containers-data/CCMixset/index.html
index e5c49a2f..2c7ffe67 100644
--- a/dev/containers-data/CCMixset/index.html
+++ b/dev/containers-data/CCMixset/index.html
@@ -1,5 +1,5 @@
-CCMixset (containers-data.CCMixset)
Module CCMixset
Set of Heterogeneous Values
let k1 : int key = newkey () in
+CCMixset (containers-data.CCMixset)
Module CCMixset
Set of Heterogeneous Values
let k1 : int key = newkey () in
let k2 : int key = newkey () in
let k3 : string key = newkey () in
let set =
@@ -11,4 +11,4 @@ in
assert (get ~key:k1 set = Some 1);
assert (get ~key:k2 set = Some 2);
assert (get ~key:k3 set = Some "3");
-()
since
0.11
type t
A set of values of heterogeneous types
type'a key
A unique "key" to access a value of type 'a in a set
newkey () creates a new unique key that can be used to access a 'a value in a set. Each key created with newkey is distinct from any other key, even if they have the same type.
newkey () creates a new unique key that can be used to access a 'a value in a set. Each key created with newkey is distinct from any other key, even if they have the same type.
\ No newline at end of file
diff --git a/dev/containers-data/CCMixtbl/index.html b/dev/containers-data/CCMixtbl/index.html
index 31a8fbac..507cd00f 100644
--- a/dev/containers-data/CCMixtbl/index.html
+++ b/dev/containers-data/CCMixtbl/index.html
@@ -1,5 +1,5 @@
-CCMixtbl (containers-data.CCMixtbl)
Module CCMixtbl
Hash Table with Heterogeneous Keys
From https://github.com/mjambon/mixtbl (thanks to him). Example:
let inj_int = CCMixtbl.create_inj () ;;
+CCMixtbl (containers-data.CCMixtbl)
Module CCMixtbl
Hash Table with Heterogeneous Keys
From https://github.com/mjambon/mixtbl (thanks to him). Example:
Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple tables (although not in a thread-safe way).
Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple tables (although not in a thread-safe way).
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html b/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html
index d6afd62d..c00e0b22 100644
--- a/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html
+++ b/dev/containers-data/CCMultiMap/Make/argument-1-K/index.html
@@ -1,2 +1,2 @@
-1-K (containers-data.CCMultiMap.Make.1-K)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html b/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html
index f9e0729b..d304fde3 100644
--- a/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html
+++ b/dev/containers-data/CCMultiMap/Make/argument-2-V/index.html
@@ -1,2 +1,2 @@
-2-V (containers-data.CCMultiMap.Make.2-V)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/Make/index.html b/dev/containers-data/CCMultiMap/Make/index.html
index 69b1e69f..06a99a3b 100644
--- a/dev/containers-data/CCMultiMap/Make/index.html
+++ b/dev/containers-data/CCMultiMap/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCMultiMap.Make)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html b/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html
index 7904c380..67cca8ca 100644
--- a/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html
+++ b/dev/containers-data/CCMultiMap/MakeBidir/argument-1-L/index.html
@@ -1,2 +1,2 @@
-1-L (containers-data.CCMultiMap.MakeBidir.1-L)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html b/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html
index c726516f..cc4d9287 100644
--- a/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html
+++ b/dev/containers-data/CCMultiMap/MakeBidir/argument-2-R/index.html
@@ -1,2 +1,2 @@
-2-R (containers-data.CCMultiMap.MakeBidir.2-R)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/MakeBidir/index.html b/dev/containers-data/CCMultiMap/MakeBidir/index.html
index 2e82918f..f5b5ea6e 100644
--- a/dev/containers-data/CCMultiMap/MakeBidir/index.html
+++ b/dev/containers-data/CCMultiMap/MakeBidir/index.html
@@ -1,2 +1,2 @@
-MakeBidir (containers-data.CCMultiMap.MakeBidir)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/index.html b/dev/containers-data/CCMultiMap/index.html
index a644532b..ccdfcb41 100644
--- a/dev/containers-data/CCMultiMap/index.html
+++ b/dev/containers-data/CCMultiMap/index.html
@@ -1,2 +1,2 @@
-CCMultiMap (containers-data.CCMultiMap)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html b/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html
index 4f168225..47e0b871 100644
--- a/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html
+++ b/dev/containers-data/CCMultiMap/module-type-BIDIR/index.html
@@ -1,2 +1,2 @@
-BIDIR (containers-data.CCMultiMap.BIDIR)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html b/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html
index 864e5122..e9f1dc8f 100644
--- a/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html
+++ b/dev/containers-data/CCMultiMap/module-type-OrderedType/index.html
@@ -1,2 +1,2 @@
-OrderedType (containers-data.CCMultiMap.OrderedType)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiMap/module-type-S/index.html b/dev/containers-data/CCMultiMap/module-type-S/index.html
index 7e41018d..a799d123 100644
--- a/dev/containers-data/CCMultiMap/module-type-S/index.html
+++ b/dev/containers-data/CCMultiMap/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCMultiMap.S)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiSet/Make/index.html b/dev/containers-data/CCMultiSet/Make/index.html
index 77d1b1a2..05dc98a0 100644
--- a/dev/containers-data/CCMultiSet/Make/index.html
+++ b/dev/containers-data/CCMultiSet/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCMultiSet.Make)
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiSet/index.html b/dev/containers-data/CCMultiSet/index.html
index 192176b7..e31e6bd7 100644
--- a/dev/containers-data/CCMultiSet/index.html
+++ b/dev/containers-data/CCMultiSet/index.html
@@ -1,2 +1,2 @@
-CCMultiSet (containers-data.CCMultiSet)
moduleMake (O : Stdlib.Set.OrderedType) : Swithtypeelt = O.t
\ No newline at end of file
diff --git a/dev/containers-data/CCMultiSet/module-type-S/index.html b/dev/containers-data/CCMultiSet/module-type-S/index.html
index f7b5c901..872c16fd 100644
--- a/dev/containers-data/CCMultiSet/module-type-S/index.html
+++ b/dev/containers-data/CCMultiSet/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCMultiSet.S)
\ No newline at end of file
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 fe553047..3ce0377f 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 @@
-1-X (containers-data.CCMutHeap.Make.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCMutHeap/Make/index.html b/dev/containers-data/CCMutHeap/Make/index.html
index 8324ee8d..f8787fd2 100644
--- a/dev/containers-data/CCMutHeap/Make/index.html
+++ b/dev/containers-data/CCMutHeap/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCMutHeap.Make)
Filter out values that don't satisfy the predicate
\ No newline at end of file
diff --git a/dev/containers-data/CCMutHeap/index.html b/dev/containers-data/CCMutHeap/index.html
index 56adec9f..86c4d2d9 100644
--- a/dev/containers-data/CCMutHeap/index.html
+++ b/dev/containers-data/CCMutHeap/index.html
@@ -1,2 +1,2 @@
-CCMutHeap (containers-data.CCMutHeap)
Module CCMutHeap
Mutable Heaps
The classic binary heap in a vector.
STATUS: experimental, this might change in breaking ways.
Filter out values that don't satisfy the predicate
\ No newline at end of file
diff --git a/dev/containers-data/CCMutHeap_intf/index.html b/dev/containers-data/CCMutHeap_intf/index.html
index 672def57..4c006da0 100644
--- a/dev/containers-data/CCMutHeap_intf/index.html
+++ b/dev/containers-data/CCMutHeap_intf/index.html
@@ -1,2 +1,2 @@
-CCMutHeap_intf (containers-data.CCMutHeap_intf)
\ No newline at end of file
diff --git a/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html b/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html
index 7c49d56a..d2f75790 100644
--- a/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html
+++ b/dev/containers-data/CCMutHeap_intf/module-type-RANKED/index.html
@@ -1,2 +1,2 @@
-RANKED (containers-data.CCMutHeap_intf.RANKED)
\ No newline at end of file
diff --git a/dev/containers-data/CCMutHeap_intf/module-type-S/index.html b/dev/containers-data/CCMutHeap_intf/module-type-S/index.html
index 0f03b535..30173dec 100644
--- a/dev/containers-data/CCMutHeap_intf/module-type-S/index.html
+++ b/dev/containers-data/CCMutHeap_intf/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCMutHeap_intf.S)
Module type CCMutHeap_intf.S
type elt
Type of elements
type t
Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)
Filter out values that don't satisfy the predicate
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentArray/index.html b/dev/containers-data/CCPersistentArray/index.html
index 0e2d031b..5d06bbbf 100644
--- a/dev/containers-data/CCPersistentArray/index.html
+++ b/dev/containers-data/CCPersistentArray/index.html
@@ -1,2 +1,2 @@
-CCPersistentArray (containers-data.CCPersistentArray)
Module CCPersistentArray
Persistent Arrays
From the paper by Jean-Christophe Filliâtre, "A persistent Union-Find data structure", see the ps version
make 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.
raises Invalid_argument
if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.
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)).
make 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.
raisesInvalid_argument
if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.
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)).
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html b/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html
index 29f402a9..2a94e45c 100644
--- a/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html
+++ b/dev/containers-data/CCPersistentHashtbl/Make/argument-1-H/index.html
@@ -1,2 +1,2 @@
-1-H (containers-data.CCPersistentHashtbl.Make.1-H)
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentHashtbl/Make/index.html b/dev/containers-data/CCPersistentHashtbl/Make/index.html
index 870c0452..18966525 100644
--- a/dev/containers-data/CCPersistentHashtbl/Make/index.html
+++ b/dev/containers-data/CCPersistentHashtbl/Make/index.html
@@ -1,2 +1,4 @@
-Make (containers-data.CCPersistentHashtbl.Make)
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
val update : 'at->key->('a option->'a option)->'at
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)->'at->'bt->'ct
Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
val update : 'at->key->('a option->'a option)->'at
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)
+->'at->'bt->'ct
Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentHashtbl/index.html b/dev/containers-data/CCPersistentHashtbl/index.html
index a649cc11..39808b77 100644
--- a/dev/containers-data/CCPersistentHashtbl/index.html
+++ b/dev/containers-data/CCPersistentHashtbl/index.html
@@ -1,2 +1,2 @@
-CCPersistentHashtbl (containers-data.CCPersistentHashtbl)
Module CCPersistentHashtbl
Persistent hash-table on top of OCaml's hashtables
Almost as efficient as the regular Hashtbl type, but with a persistent interface (rewinding changes to get back in the past history). This is mostly useful for backtracking-like uses, or forward uses (never using old values).
This module is not thread-safe.
type'a iter = ('a-> unit)-> unit
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
+CCPersistentHashtbl (containers-data.CCPersistentHashtbl)
Module CCPersistentHashtbl
Persistent hash-table on top of OCaml's hashtables
Almost as efficient as the regular Hashtbl type, but with a persistent interface (rewinding changes to get back in the past history). This is mostly useful for backtracking-like uses, or forward uses (never using old values).
This module is not thread-safe.
type'a iter = ('a-> unit)-> unit
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html b/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html
index b20d543d..cb20ef64 100644
--- a/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html
+++ b/dev/containers-data/CCPersistentHashtbl/module-type-HashedType/index.html
@@ -1,2 +1,2 @@
-HashedType (containers-data.CCPersistentHashtbl.HashedType)
\ No newline at end of file
diff --git a/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html b/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html
index 48f909b7..4ebc69f5 100644
--- a/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html
+++ b/dev/containers-data/CCPersistentHashtbl/module-type-S/index.html
@@ -1,2 +1,4 @@
-S (containers-data.CCPersistentHashtbl.S)
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
val update : 'at->key->('a option->'a option)->'at
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)->'at->'bt->'ct
Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
val update : 'at->key->('a option->'a option)->'at
update tbl key f calls f None if key doesn't belong in tbl, f (Some v) if key -> v otherwise; If f returns None then key is removed, else it returns Some v' and key -> v' is added.
Fresh copy of the table; the underlying structure is not shared anymore, so using both tables alternatively will be efficient.
val merge : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)
+->'at->'bt->'ct
Merge two tables together into a new table. The function's argument correspond to values associated with the key (if present); if the function returns None the key will not appear in the result.
\ No newline at end of file
diff --git a/dev/containers-data/CCRAL/Infix/index.html b/dev/containers-data/CCRAL/Infix/index.html
index 77520aa1..08c6ab3e 100644
--- a/dev/containers-data/CCRAL/Infix/index.html
+++ b/dev/containers-data/CCRAL/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers-data.CCRAL.Infix)
a --^ b is the integer range from a to b, where b is excluded.
since 0.17
\ No newline at end of file
diff --git a/dev/containers-data/CCRAL/index.html b/dev/containers-data/CCRAL/index.html
index 094959da..9c38c493 100644
--- a/dev/containers-data/CCRAL/index.html
+++ b/dev/containers-data/CCRAL/index.html
@@ -1,2 +1,2 @@
-CCRAL (containers-data.CCRAL)
Module CCRAL
Random-Access Lists
This is an OCaml implementation of Okasaki's paper "Purely Functional Random Access Lists". It defines a list-like data structure with O(1) cons/tail operations, and O(log(n)) lookup/modification operations.
\ No newline at end of file
+CCRAL (containers-data.CCRAL)
Module CCRAL
Random-Access Lists
This is an OCaml implementation of Okasaki's paper "Purely Functional Random Access Lists". It defines a list-like data structure with O(1) cons/tail operations, and O(log(n)) lookup/modification operations.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Array/Byte/index.html b/dev/containers-data/CCRingBuffer/Array/Byte/index.html
index fab92454..dc43dec5 100644
--- a/dev/containers-data/CCRingBuffer/Array/Byte/index.html
+++ b/dev/containers-data/CCRingBuffer/Array/Byte/index.html
@@ -1,2 +1,2 @@
-Byte (containers-data.CCRingBuffer.Array.Byte)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html b/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html
index f04bcadb..466f30b3 100644
--- a/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html
+++ b/dev/containers-data/CCRingBuffer/Array/Make/argument-1-Elt/index.html
@@ -1,2 +1,2 @@
-1-Elt (containers-data.CCRingBuffer.Array.Make.1-Elt)
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Array/Make/index.html b/dev/containers-data/CCRingBuffer/Array/Make/index.html
index ce670f9b..abe5f949 100644
--- a/dev/containers-data/CCRingBuffer/Array/Make/index.html
+++ b/dev/containers-data/CCRingBuffer/Array/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCRingBuffer.Array.Make)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Array/index.html b/dev/containers-data/CCRingBuffer/Array/index.html
index 954f943e..255f7c33 100644
--- a/dev/containers-data/CCRingBuffer/Array/index.html
+++ b/dev/containers-data/CCRingBuffer/Array/index.html
@@ -1,2 +1,2 @@
-Array (containers-data.CCRingBuffer.Array)
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html b/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html
index ed345d79..e7daa95a 100644
--- a/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html
+++ b/dev/containers-data/CCRingBuffer/Array/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCRingBuffer.Array.S)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Byte/index.html b/dev/containers-data/CCRingBuffer/Byte/index.html
index 02742842..7a7bfcbd 100644
--- a/dev/containers-data/CCRingBuffer/Byte/index.html
+++ b/dev/containers-data/CCRingBuffer/Byte/index.html
@@ -1,2 +1,2 @@
-Byte (containers-data.CCRingBuffer.Byte)
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Make/Array/index.html b/dev/containers-data/CCRingBuffer/Make/Array/index.html
index 4f98774f..05274889 100644
--- a/dev/containers-data/CCRingBuffer/Make/Array/index.html
+++ b/dev/containers-data/CCRingBuffer/Make/Array/index.html
@@ -1,2 +1,2 @@
-Array (containers-data.CCRingBuffer.Make.Array)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html b/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html
index bee0566b..8948bdd9 100644
--- a/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html
+++ b/dev/containers-data/CCRingBuffer/Make/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCRingBuffer.Make.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/Make/index.html b/dev/containers-data/CCRingBuffer/Make/index.html
index a6965420..02067d0b 100644
--- a/dev/containers-data/CCRingBuffer/Make/index.html
+++ b/dev/containers-data/CCRingBuffer/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCRingBuffer.Make)
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html b/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html
index 07f70d40..c2694e85 100644
--- a/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html
+++ b/dev/containers-data/CCRingBuffer/MakeFromArray/argument-1-A/index.html
@@ -1,2 +1,2 @@
-1-A (containers-data.CCRingBuffer.MakeFromArray.1-A)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/MakeFromArray/index.html b/dev/containers-data/CCRingBuffer/MakeFromArray/index.html
index 1a3e1e90..fdf83b79 100644
--- a/dev/containers-data/CCRingBuffer/MakeFromArray/index.html
+++ b/dev/containers-data/CCRingBuffer/MakeFromArray/index.html
@@ -1,2 +1,2 @@
-MakeFromArray (containers-data.CCRingBuffer.MakeFromArray)
Module CCRingBuffer.MakeFromArray
Makes a ring buffer module with the given array type
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/index.html b/dev/containers-data/CCRingBuffer/index.html
index 20e505b9..dc5834c6 100644
--- a/dev/containers-data/CCRingBuffer/index.html
+++ b/dev/containers-data/CCRingBuffer/index.html
@@ -1,2 +1,2 @@
-CCRingBuffer (containers-data.CCRingBuffer)
Module CCRingBuffer
Circular Buffer (Deque)
Useful for IO, or as a bounded-size alternative to Queue when batch operations are needed.
status: experimental
Change in the API to provide only a bounded buffer since 1.3
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html b/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html
index 326371aa..2cda7163 100644
--- a/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html
+++ b/dev/containers-data/CCRingBuffer/module-type-S/Array/index.html
@@ -1,2 +1,2 @@
-Array (containers-data.CCRingBuffer.S.Array)
iter f t iterates over the array t invoking f with the current element, in array order.
\ No newline at end of file
diff --git a/dev/containers-data/CCRingBuffer/module-type-S/index.html b/dev/containers-data/CCRingBuffer/module-type-S/index.html
index 1a04a3db..759f1fb2 100644
--- a/dev/containers-data/CCRingBuffer/module-type-S/index.html
+++ b/dev/containers-data/CCRingBuffer/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCRingBuffer.S)
Module type CCRingBuffer.S
Ring Buffer
The abstract ring buffer type, made concrete by choice of ARRAY module implementation
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
create size creates a new bounded buffer with given size. The underlying array is allocated immediately and no further (large) allocation will happen from now on.
blit_from buf from_buf o len copies the slice o, ... o + len - 1 from an input buffer from_buf to the end of the buffer. If the slice is too large for the buffer, only the last part of the array will be copied.
\ No newline at end of file
diff --git a/dev/containers-data/CCSimple_queue/Infix/index.html b/dev/containers-data/CCSimple_queue/Infix/index.html
index 934c79d5..a9f4d977 100644
--- a/dev/containers-data/CCSimple_queue/Infix/index.html
+++ b/dev/containers-data/CCSimple_queue/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers-data.CCSimple_queue.Infix)
\ No newline at end of file
diff --git a/dev/containers-data/CCSimple_queue/index.html b/dev/containers-data/CCSimple_queue/index.html
index b7c38524..858d441e 100644
--- a/dev/containers-data/CCSimple_queue/index.html
+++ b/dev/containers-data/CCSimple_queue/index.html
@@ -1,2 +1,2 @@
-CCSimple_queue (containers-data.CCSimple_queue)
Module CCSimple_queue
Functional queues (fifo)
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/Make/argument-1-W/index.html b/dev/containers-data/CCTrie/Make/argument-1-W/index.html
index 86678c53..dbc0314a 100644
--- a/dev/containers-data/CCTrie/Make/argument-1-W/index.html
+++ b/dev/containers-data/CCTrie/Make/argument-1-W/index.html
@@ -1,2 +1,2 @@
-1-W (containers-data.CCTrie.Make.1-W)
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/Make/index.html b/dev/containers-data/CCTrie/Make/index.html
index 31041b30..1d818632 100644
--- a/dev/containers-data/CCTrie/Make/index.html
+++ b/dev/containers-data/CCTrie/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-data.CCTrie.Make)
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since
0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since 0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
All bindings whose key is smaller or equal to the given key, in decreasing order.
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html b/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html
index 828085c4..d5a18520 100644
--- a/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html
+++ b/dev/containers-data/CCTrie/MakeArray/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCTrie.MakeArray.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/MakeArray/index.html b/dev/containers-data/CCTrie/MakeArray/index.html
index 6147d4fa..528d4555 100644
--- a/dev/containers-data/CCTrie/MakeArray/index.html
+++ b/dev/containers-data/CCTrie/MakeArray/index.html
@@ -1,2 +1,2 @@
-MakeArray (containers-data.CCTrie.MakeArray)
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since
0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since 0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
All bindings whose key is smaller or equal to the given key, in decreasing order.
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html b/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html
index 8e4519fd..8758826b 100644
--- a/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html
+++ b/dev/containers-data/CCTrie/MakeList/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCTrie.MakeList.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/MakeList/index.html b/dev/containers-data/CCTrie/MakeList/index.html
index fb969460..e43feae7 100644
--- a/dev/containers-data/CCTrie/MakeList/index.html
+++ b/dev/containers-data/CCTrie/MakeList/index.html
@@ -1,2 +1,2 @@
-MakeList (containers-data.CCTrie.MakeList)
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since
0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since 0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
All bindings whose key is smaller or equal to the given key, in decreasing order.
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/String/index.html b/dev/containers-data/CCTrie/String/index.html
index 1d652690..6f6a6d8c 100644
--- a/dev/containers-data/CCTrie/String/index.html
+++ b/dev/containers-data/CCTrie/String/index.html
@@ -1,2 +1,2 @@
-String (containers-data.CCTrie.String)
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since
0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since 0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
All bindings whose key is smaller or equal to the given key, in decreasing order.
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/index.html b/dev/containers-data/CCTrie/index.html
index 6cdf45a1..5769e037 100644
--- a/dev/containers-data/CCTrie/index.html
+++ b/dev/containers-data/CCTrie/index.html
@@ -1,2 +1,2 @@
-CCTrie (containers-data.CCTrie)
Module CCTrie
Prefix Tree
type'a iter = ('a-> unit)-> unit
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
Signatures
A Composite Word
Words are made of characters, who belong to a total order
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/module-type-ORDERED/index.html b/dev/containers-data/CCTrie/module-type-ORDERED/index.html
index 2ad9d60d..eb92b85a 100644
--- a/dev/containers-data/CCTrie/module-type-ORDERED/index.html
+++ b/dev/containers-data/CCTrie/module-type-ORDERED/index.html
@@ -1,2 +1,2 @@
-ORDERED (containers-data.CCTrie.ORDERED)
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/module-type-S/index.html b/dev/containers-data/CCTrie/module-type-S/index.html
index 9ff6e1f3..6d91235f 100644
--- a/dev/containers-data/CCTrie/module-type-S/index.html
+++ b/dev/containers-data/CCTrie/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers-data.CCTrie.S)
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since
0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
longest_prefix k m finds the longest prefix of k that leads to at least one path in m (it does not mean that the prefix is bound to a value.
Example: if m has keys "abc0" and "abcd", then longest_prefix "abc2" m will return "abc".
since 0.17
val update : key->('a option->'a option)->'at->'at
Update the binding for the given key. The function is given None if the key is absent, or Some v if key is bound to v; if it returns None the key is removed, otherwise it returns Some y and key becomes bound to y.
All bindings whose key is smaller or equal to the given key, in decreasing order.
\ No newline at end of file
diff --git a/dev/containers-data/CCTrie/module-type-WORD/index.html b/dev/containers-data/CCTrie/module-type-WORD/index.html
index e637258c..4c00cc39 100644
--- a/dev/containers-data/CCTrie/module-type-WORD/index.html
+++ b/dev/containers-data/CCTrie/module-type-WORD/index.html
@@ -1,2 +1,2 @@
-WORD (containers-data.CCTrie.WORD)
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/Make/argument-1-X/index.html b/dev/containers-data/CCWBTree/Make/argument-1-X/index.html
index f21a9b4f..ae5fa9c4 100644
--- a/dev/containers-data/CCWBTree/Make/argument-1-X/index.html
+++ b/dev/containers-data/CCWBTree/Make/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCWBTree.Make.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/Make/index.html b/dev/containers-data/CCWBTree/Make/index.html
index c72a3c6a..ca236b2d 100644
--- a/dev/containers-data/CCWBTree/Make/index.html
+++ b/dev/containers-data/CCWBTree/Make/index.html
@@ -1,2 +1,3 @@
-Make (containers-data.CCWBTree.Make)
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html b/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html
index d1478a15..61b220da 100644
--- a/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html
+++ b/dev/containers-data/CCWBTree/MakeFull/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers-data.CCWBTree.MakeFull.1-X)
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/MakeFull/index.html b/dev/containers-data/CCWBTree/MakeFull/index.html
index 6cda2d14..ac6e031b 100644
--- a/dev/containers-data/CCWBTree/MakeFull/index.html
+++ b/dev/containers-data/CCWBTree/MakeFull/index.html
@@ -1,2 +1,3 @@
-MakeFull (containers-data.CCWBTree.MakeFull)
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/index.html b/dev/containers-data/CCWBTree/index.html
index 0dd06e58..37603ae5 100644
--- a/dev/containers-data/CCWBTree/index.html
+++ b/dev/containers-data/CCWBTree/index.html
@@ -1,2 +1,2 @@
-CCWBTree (containers-data.CCWBTree)
Module CCWBTree
Weight-Balanced Tree
status: experimental
since
0.13
type'a iter = ('a-> unit)-> unit
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/module-type-KEY/index.html b/dev/containers-data/CCWBTree/module-type-KEY/index.html
index 8d5793b5..dc993494 100644
--- a/dev/containers-data/CCWBTree/module-type-KEY/index.html
+++ b/dev/containers-data/CCWBTree/module-type-KEY/index.html
@@ -1,2 +1,2 @@
-KEY (containers-data.CCWBTree.KEY)
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/module-type-ORD/index.html b/dev/containers-data/CCWBTree/module-type-ORD/index.html
index 91b54c41..5a4413a6 100644
--- a/dev/containers-data/CCWBTree/module-type-ORD/index.html
+++ b/dev/containers-data/CCWBTree/module-type-ORD/index.html
@@ -1,2 +1,2 @@
-ORD (containers-data.CCWBTree.ORD)
\ No newline at end of file
diff --git a/dev/containers-data/CCWBTree/module-type-S/index.html b/dev/containers-data/CCWBTree/module-type-S/index.html
index ff12bf80..2838874f 100644
--- a/dev/containers-data/CCWBTree/module-type-S/index.html
+++ b/dev/containers-data/CCWBTree/module-type-S/index.html
@@ -1,2 +1,3 @@
-S (containers-data.CCWBTree.S)
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
val get_rank : key->'at->[ `At of int| `After of int| `First ]
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
val merge : f:(key->'a option->'b option->'c option)->'at->'bt->'ct
\ No newline at end of file
diff --git a/dev/containers-data/CCZipper/index.html b/dev/containers-data/CCZipper/index.html
index 55244d43..7a423161 100644
--- a/dev/containers-data/CCZipper/index.html
+++ b/dev/containers-data/CCZipper/index.html
@@ -1,2 +1,2 @@
-CCZipper (containers-data.CCZipper)
Module CCZipper
List Zipper
since
1.0
type'a t = 'a list * 'a list
The pair l, r represents the list List.rev_append l r, but with the focus on r
Drop every element on the "right" (calling right then will do nothing), including the focused element if it is present.
\ No newline at end of file
diff --git a/dev/containers-data/Containers_data_top/index.html b/dev/containers-data/Containers_data_top/index.html
index 51f65950..d20d22e6 100644
--- a/dev/containers-data/Containers_data_top/index.html
+++ b/dev/containers-data/Containers_data_top/index.html
@@ -1,2 +1,2 @@
-Containers_data_top (containers-data.Containers_data_top)
Module Containers_data_top
type'a printer = Stdlib.Format.formatter ->'a-> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list-> unit
\ No newline at end of file
+Containers_data_top (containers-data.Containers_data_top)
Module Containers_data_top
type'a printer = Stdlib.Format.formatter ->'a-> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list-> unit
\ No newline at end of file
diff --git a/dev/containers-data/index.html b/dev/containers-data/index.html
index 1282d48c..6aeb5b86 100644
--- a/dev/containers-data/index.html
+++ b/dev/containers-data/index.html
@@ -1,2 +1,2 @@
-index (containers-data.index)
containers-data index
Library containers-data
This library exposes the following toplevel modules:
\ No newline at end of file
diff --git a/dev/containers-thread/CCBlockingQueue/index.html b/dev/containers-thread/CCBlockingQueue/index.html
index 5e852b65..c71b6bf4 100644
--- a/dev/containers-thread/CCBlockingQueue/index.html
+++ b/dev/containers-thread/CCBlockingQueue/index.html
@@ -1,2 +1,2 @@
-CCBlockingQueue (containers-thread.CCBlockingQueue)
Module CCBlockingQueue
Blocking Queue
This queue has a limited size. Pushing a value on the queue when it is full will block.
Create a new queue of size n. Using n=max_int amounts to using an infinite queue (2^61 items is a lot to fit in memory); using n=1 amounts to using a box with 0 or 1 elements inside.
Create a new queue of size n. Using n=max_int amounts to using an infinite queue (2^61 items is a lot to fit in memory); using n=1 amounts to using a box with 0 or 1 elements inside.
\ No newline at end of file
diff --git a/dev/containers-thread/CCLock/LockRef/index.html b/dev/containers-thread/CCLock/LockRef/index.html
index d25d121d..eaca2c16 100644
--- a/dev/containers-thread/CCLock/LockRef/index.html
+++ b/dev/containers-thread/CCLock/LockRef/index.html
@@ -1,2 +1,2 @@
-LockRef (containers-thread.CCLock.LockRef)
Module CCLock.LockRef
Type allowing to manipulate the lock as a reference.
\ No newline at end of file
diff --git a/dev/containers-thread/CCLock/index.html b/dev/containers-thread/CCLock/index.html
index ed912a69..b21379d3 100644
--- a/dev/containers-thread/CCLock/index.html
+++ b/dev/containers-thread/CCLock/index.html
@@ -1,2 +1,2 @@
-CCLock (containers-thread.CCLock)
with_lock l f runs f x where x is the value protected with the lock l, in a critical section. If f x fails, with_lock l f fails too but the lock is released.
try_with_lock l f runs f x in a critical section if l is not locked. x is the value protected by the lock l. If f x fails, try_with_lock l f fails too but the lock is released.
Type allowing to manipulate the lock as a reference.
val with_lock_as_ref : 'at->f:('aLockRef.t->'b)->'b
with_lock_as_ref l f calls f with a reference-like object that allows to manipulate the value of l safely. The object passed to f must not escape the function call.
with_lock l f runs f x where x is the value protected with the lock l, in a critical section. If f x fails, with_lock l f fails too but the lock is released.
try_with_lock l f runs f x in a critical section if l is not locked. x is the value protected by the lock l. If f x fails, try_with_lock l f fails too but the lock is released.
Type allowing to manipulate the lock as a reference.
val with_lock_as_ref : 'at->f:('aLockRef.t->'b)->'b
with_lock_as_ref l f calls f with a reference-like object that allows to manipulate the value of l safely. The object passed to f must not escape the function call.
get_then_clear b sets b to false, and returns the old value.
since 0.16
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/Make/Fut/Infix/index.html b/dev/containers-thread/CCPool/Make/Fut/Infix/index.html
index 31c20a56..1f9f0409 100644
--- a/dev/containers-thread/CCPool/Make/Fut/Infix/index.html
+++ b/dev/containers-thread/CCPool/Make/Fut/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers-thread.CCPool.Make.Fut.Infix)
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/Make/Fut/index.html b/dev/containers-thread/CCPool/Make/Fut/index.html
index 73ffb0e0..b9c62af4 100644
--- a/dev/containers-thread/CCPool/Make/Fut/index.html
+++ b/dev/containers-thread/CCPool/Make/Fut/index.html
@@ -1,2 +1,2 @@
-Fut (containers-thread.CCPool.Make.Fut)
Module Make.Fut
Futures
The futures are registration points for callbacks, storing a state, that are executed in the pool using run.
Blocking 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.
Attach 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.
Blocking 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.
Attach 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.
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/Make/argument-1-P/index.html b/dev/containers-thread/CCPool/Make/argument-1-P/index.html
index 1b4816ce..ebc9022e 100644
--- a/dev/containers-thread/CCPool/Make/argument-1-P/index.html
+++ b/dev/containers-thread/CCPool/Make/argument-1-P/index.html
@@ -1,2 +1,2 @@
-1-P (containers-thread.CCPool.Make.1-P)
Parameter Make.1-P
val max_size : int
Maximum number of threads in the pool.
\ No newline at end of file
+P (containers-thread.CCPool.Make.1-P)
Parameter Make.1-P
val max_size : int
Maximum number of threads in the pool.
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/Make/index.html b/dev/containers-thread/CCPool/Make/index.html
index 7d11fe16..722b421d 100644
--- a/dev/containers-thread/CCPool/Make/index.html
+++ b/dev/containers-thread/CCPool/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers-thread.CCPool.Make)
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/index.html b/dev/containers-thread/CCPool/index.html
index 9d7e4cfa..60e1300e 100644
--- a/dev/containers-thread/CCPool/index.html
+++ b/dev/containers-thread/CCPool/index.html
@@ -1,2 +1,2 @@
-CCPool (containers-thread.CCPool)
\ No newline at end of file
diff --git a/dev/containers-thread/CCPool/module-type-PARAM/index.html b/dev/containers-thread/CCPool/module-type-PARAM/index.html
index e78b24e8..d090fd19 100644
--- a/dev/containers-thread/CCPool/module-type-PARAM/index.html
+++ b/dev/containers-thread/CCPool/module-type-PARAM/index.html
@@ -1,2 +1,2 @@
-PARAM (containers-thread.CCPool.PARAM)
Module type CCPool.PARAM
val max_size : int
Maximum number of threads in the pool.
\ No newline at end of file
+PARAM (containers-thread.CCPool.PARAM)
Module type CCPool.PARAM
val max_size : int
Maximum number of threads in the pool.
\ No newline at end of file
diff --git a/dev/containers-thread/CCSemaphore/index.html b/dev/containers-thread/CCSemaphore/index.html
index 03209e29..4c515996 100644
--- a/dev/containers-thread/CCSemaphore/index.html
+++ b/dev/containers-thread/CCSemaphore/index.html
@@ -1,2 +1,2 @@
-CCSemaphore (containers-thread.CCSemaphore)
with_acquire ~n s ~f first acquires s with n units, calls f (), and then releases s with n units. Safely release the semaphore even if f () fails.
val wait_until_at_least : n:int ->t->f:(unit ->'a)->'a
wait_until_at_least ~n s ~f waits until get s >= n, then calls f () and returns its result. Doesn't modify the semaphore.
\ No newline at end of file
diff --git a/dev/containers-thread/CCThread/Arr/index.html b/dev/containers-thread/CCThread/Arr/index.html
index 9338148b..056a5e4c 100644
--- a/dev/containers-thread/CCThread/Arr/index.html
+++ b/dev/containers-thread/CCThread/Arr/index.html
@@ -1,2 +1,2 @@
-Arr (containers-thread.CCThread.Arr)
\ No newline at end of file
diff --git a/dev/containers-thread/CCThread/Barrier/index.html b/dev/containers-thread/CCThread/Barrier/index.html
index 1eb80cb0..547a2a7c 100644
--- a/dev/containers-thread/CCThread/Barrier/index.html
+++ b/dev/containers-thread/CCThread/Barrier/index.html
@@ -1,2 +1,2 @@
-Barrier (containers-thread.CCThread.Barrier)
wait b waits for barrier b to be activated by activate b. All threads calling this wait until activate b is called. If b is already activated, wait b does nothing.
wait b waits for barrier b to be activated by activate b. All threads calling this wait until activate b is called. If b is already activated, wait b does nothing.
activated b returns true iff activate b was called, and reset b was not called since. In other words, activated b = true means wait b will not block.
\ No newline at end of file
diff --git a/dev/containers-thread/CCThread/index.html b/dev/containers-thread/CCThread/index.html
index 1c037181..dec4d7b1 100644
--- a/dev/containers-thread/CCThread/index.html
+++ b/dev/containers-thread/CCThread/index.html
@@ -1,2 +1,2 @@
-CCThread (containers-thread.CCThread)
\ No newline at end of file
diff --git a/dev/containers-thread/CCTimer/index.html b/dev/containers-thread/CCTimer/index.html
index f94ab59d..866b2fd0 100644
--- a/dev/containers-thread/CCTimer/index.html
+++ b/dev/containers-thread/CCTimer/index.html
@@ -1,2 +1,2 @@
-CCTimer (containers-thread.CCTimer)
Module CCTimer
Event timer
Used to be part of CCFuture.
since
0.16
type t
A scheduler for events. It runs in its own thread.
\ No newline at end of file
diff --git a/dev/containers-thread/index.html b/dev/containers-thread/index.html
index 06d66551..bb346628 100644
--- a/dev/containers-thread/index.html
+++ b/dev/containers-thread/index.html
@@ -1,2 +1,2 @@
-index (containers-thread.index)
containers-thread index
Library containers-thread
This library exposes the following toplevel modules:
\ No newline at end of file
diff --git a/dev/containers/CCArray/Infix/index.html b/dev/containers/CCArray/Infix/index.html
index cf25c65a..6f1dbabc 100644
--- a/dev/containers/CCArray/Infix/index.html
+++ b/dev/containers/CCArray/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCArray.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCArray/index.html b/dev/containers/CCArray/index.html
index c6ebb174..3f3b8d33 100644
--- a/dev/containers/CCArray/index.html
+++ b/dev/containers/CCArray/index.html
@@ -1,2 +1,4 @@
-CCArray (containers.CCArray)
Module CCArray
Array utils
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a gen = unit ->'a option
type'a equal = 'a->'a-> bool
type'a ord = 'a->'a-> int
type'a random_gen = Stdlib.Random.State.t ->'a
type'a printer = Stdlib.Format.formatter ->'a-> unit
sort_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.
sort_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).
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).
returns
None if the key key is not present, or Some i (i the index of the key) otherwise.
val bsearch : cmp:('a->'a-> int)->'a->'at->[ `All_lower | `All_bigger| `Just_after of int| `Empty| `At of int ]
bsearch ~cmp key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).
Complexity: O(log n) where n is the length of the array a (dichotomic search).
returns
`At i if cmp a.(i) key = 0 (for some i).
`All_lower if all elements of a are lower than key.
`All_bigger if all elements of a are bigger than key.
for_all2 f [|a1; …; an|] [|b1; …; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && … && (f an bn).
raises Invalid_argument
if arrays have distinct lengths. Allow different types.
exists2 f [|a1; …; an|] [|b1; …; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || … || (f an bn).
raises Invalid_argument
if arrays have distinct lengths. Allow different types.
since
0.20
val fold2 : ('acc->'a->'b->'acc)->'acc->'at->'bt->'acc
fold2 f init a b fold on two arrays a and b stepwise. It computes f (… (f init a1 b1) …) an bn.
shuffle a randomly shuffles the array a, in place.
val shuffle_with : Stdlib.Random.State.t ->'at-> unit
shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).
to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.
to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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 ",@ ").
pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. 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 ",@ ").
filter_map f [|a1; …; an|] calls (f a1) … (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.
sort_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.
sort_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).
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).
returns
None if the key key is not present, or Some i (i the index of the key) otherwise.
val bsearch : cmp:('a->'a-> int)->
+'a->'at->[ `All_lower | `All_bigger| `Just_after of int| `Empty| `At of int ]
bsearch ~cmp key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).
Complexity: O(log n) where n is the length of the array a (dichotomic search).
returns
`At i if cmp a.(i) key = 0 (for some i).
`All_lower if all elements of a are lower than key.
`All_bigger if all elements of a are bigger than key.
for_all2 f [|a1; …; an|] [|b1; …; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && … && (f an bn).
raisesInvalid_argument
if arrays have distinct lengths. Allow different types.
exists2 f [|a1; …; an|] [|b1; …; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || … || (f an bn).
raisesInvalid_argument
if arrays have distinct lengths. Allow different types.
since 0.20
val fold2 : ('acc->'a->'b->'acc)->'acc->'at->'bt->'acc
fold2 f init a b fold on two arrays a and b stepwise. It computes f (… (f init a1 b1) …) an bn.
shuffle a randomly shuffles the array a, in place.
val shuffle_with : Stdlib.Random.State.t ->'at-> unit
shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).
to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.
to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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 ",@ ").
pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. 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 ",@ ").
filter_map f [|a1; …; an|] calls (f a1) … (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.
\ No newline at end of file
diff --git a/dev/containers/CCArray/module-type-MONO_ARRAY/index.html b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html
index e73d22c3..2afed9ad 100644
--- a/dev/containers/CCArray/module-type-MONO_ARRAY/index.html
+++ b/dev/containers/CCArray/module-type-MONO_ARRAY/index.html
@@ -1,2 +1,2 @@
-MONO_ARRAY (containers.CCArray.MONO_ARRAY)
\ No newline at end of file
diff --git a/dev/containers/CCArrayLabels/Floatarray/index.html b/dev/containers/CCArrayLabels/Floatarray/index.html
index 11171f71..619a481f 100644
--- a/dev/containers/CCArrayLabels/Floatarray/index.html
+++ b/dev/containers/CCArrayLabels/Floatarray/index.html
@@ -1,2 +1,2 @@
-Floatarray (containers.CCArrayLabels.Floatarray)
Module CCArrayLabels.Floatarray
val create : int -> floatarray
val length : floatarray -> int
val get : floatarray -> int -> float
val set : floatarray -> int -> float -> unit
val unsafe_get : floatarray -> int -> float
val unsafe_set : floatarray -> int -> float -> unit
\ No newline at end of file
+Floatarray (containers.CCArrayLabels.Floatarray)
Module CCArrayLabels.Floatarray
val create : int -> floatarray
val length : floatarray -> int
val get : floatarray ->int -> float
val set : floatarray ->int ->float -> unit
val unsafe_get : floatarray ->int -> float
val unsafe_set : floatarray ->int ->float -> unit
\ No newline at end of file
diff --git a/dev/containers/CCArrayLabels/Infix/index.html b/dev/containers/CCArrayLabels/Infix/index.html
index dd409dd8..057c3ee3 100644
--- a/dev/containers/CCArrayLabels/Infix/index.html
+++ b/dev/containers/CCArrayLabels/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCArrayLabels.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCArrayLabels/index.html b/dev/containers/CCArrayLabels/index.html
index 3d2a3809..5d7564ae 100644
--- a/dev/containers/CCArrayLabels/index.html
+++ b/dev/containers/CCArrayLabels/index.html
@@ -1,2 +1,5 @@
-CCArrayLabels (containers.CCArrayLabels)
Module CCArrayLabels
Array utils
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a gen = unit ->'a option
type'a equal = 'a->'a-> bool
type'a ord = 'a->'a-> int
type'a random_gen = Stdlib.Random.State.t ->'a
type'a printer = Stdlib.Format.formatter ->'a-> unit
sorted ~f a makes a copy of a and sorts it with f.
since
1.0
val sort_indices : f:('a->'a-> int)->'at->int array
sort_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.
since
1.0
val sort_ranking : f:('a->'a-> int)->'at->int array
sort_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).
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).
returns
None if the key key is not present, or Some i (i the index of the key) otherwise.
val bsearch : cmp:('a->'a-> int)->key:'a->'at->[ `All_lower | `All_bigger| `Just_after of int| `Empty| `At of int ]
bsearch ~cmp ~key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).
Complexity: O(log n) where n is the length of the array a (dichotomic search).
returns
`At i if cmp a.(i) key = 0 (for some i).
`All_lower if all elements of a are lower than key.
`All_bigger if all elements of a are bigger than key.
for_all2 ~f [|a1; …; an|] [|b1; …; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && … && (f an bn).
raises Invalid_argument
if arrays have distinct lengths. Allow different types.
exists2 ~f [|a1; …; an|] [|b1; …; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || … || (f an bn).
raises Invalid_argument
if arrays have distinct lengths. Allow different types.
since
0.20
val fold2 : f:('acc->'a->'b->'acc)->init:'acc->'at->'bt->'acc
fold2 ~f ~init a b fold on two arrays a and b stepwise. It computes f (… (f init a1 b1) …) an bn.
shuffle a randomly shuffles the array a, in place.
val shuffle_with : Stdlib.Random.State.t ->'at-> unit
shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).
to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.
to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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 ",@ ").
pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. 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 ",@ ").
map2 ~f a b applies function f to all elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); …; f a.(length a - 1) b.(length b - 1)|].
filter_map ~f [|a1; …; an|] calls (f a1) … (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.
val monoid_product : f:('a->'b->'c)->'at->'bt->'ct
monoid_product ~f a b passes all combinaisons of tuples from the two arrays a and b to the function f.
sorted ~f a makes a copy of a and sorts it with f.
since 1.0
val sort_indices : f:('a->'a-> int)->'at->int array
sort_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.
since 1.0
val sort_ranking : f:('a->'a-> int)->'at->int array
sort_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).
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).
returns
None if the key key is not present, or Some i (i the index of the key) otherwise.
val bsearch : cmp:('a->'a-> int)->key:'a->
+'at->[ `All_lower | `All_bigger| `Just_after of int| `Empty| `At of int ]
bsearch ~cmp ~key a finds the index of the object key in the array a, provided a is sorted using cmp. If the array is not sorted, the result is not specified (may raise Invalid_argument).
Complexity: O(log n) where n is the length of the array a (dichotomic search).
returns
`At i if cmp a.(i) key = 0 (for some i).
`All_lower if all elements of a are lower than key.
`All_bigger if all elements of a are bigger than key.
for_all2 ~f [|a1; …; an|] [|b1; …; bn|] is true if each pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) && (f a2 b2) && … && (f an bn).
raisesInvalid_argument
if arrays have distinct lengths. Allow different types.
exists2 ~f [|a1; …; an|] [|b1; …; bn|] is true if any pair of elements ai bi satisfies the predicate f. That is, it returns (f a1 b1) || (f a2 b2) || … || (f an bn).
raisesInvalid_argument
if arrays have distinct lengths. Allow different types.
since 0.20
val fold2 : f:('acc->'a->'b->'acc)->init:'acc->'at->'bt->'acc
fold2 ~f ~init a b fold on two arrays a and b stepwise. It computes f (… (f init a1 b1) …) an bn.
shuffle a randomly shuffles the array a, in place.
val shuffle_with : Stdlib.Random.State.t ->'at-> unit
shuffle_with rs a randomly shuffles the array a (like shuffle) but a specialized random state rs is used to control the random numbers being produced during shuffling (for reproducibility).
to_iter a returns an iter of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the iterator.
to_seq a returns a Seq.t of the elements of an array a. The input array a is shared with the sequence and modification of it will result in modification of the sequence. Renamed from to_std_seq since 3.0.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf a formats the array a 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 ",@ ").
pp_i ~pp_start ~pp_stop ~pp_sep pp_item ppf a prints the array a on ppf. The printing function pp_item is giving both index and element. 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 ",@ ").
map2 ~f a b applies function f to all elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); …; f a.(length a - 1) b.(length b - 1)|].
filter_map ~f [|a1; …; an|] calls (f a1) … (f an) and returns an array b consisting of all elements bi such as f ai = Some bi. When f returns None, the corresponding element of a is discarded.
val monoid_product : f:('a->'b->'c)->'at->'bt->'ct
monoid_product ~f a b passes all combinaisons of tuples from the two arrays a and b to the function f.
\ No newline at end of file
diff --git a/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html
index 29d82a02..583e6d5e 100644
--- a/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html
+++ b/dev/containers/CCArrayLabels/module-type-MONO_ARRAY/index.html
@@ -1,2 +1,2 @@
-MONO_ARRAY (containers.CCArrayLabels.MONO_ARRAY)
\ No newline at end of file
diff --git a/dev/containers/CCBool/index.html b/dev/containers/CCBool/index.html
index d8474f98..266a3fab 100644
--- a/dev/containers/CCBool/index.html
+++ b/dev/containers/CCBool/index.html
@@ -1,2 +1,2 @@
-CCBool (containers.CCBool)
\ No newline at end of file
diff --git a/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html b/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html
index d9ae8974..72e4a6f9 100644
--- a/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html
+++ b/dev/containers/CCCanonical_sexp/Make/argument-1-Sexp/index.html
@@ -1,2 +1,2 @@
-1-Sexp (containers.CCCanonical_sexp.Make.1-Sexp)
val match_ : t->atom:(string ->'a)->list:(t list->'a)->'a
\ No newline at end of file
diff --git a/dev/containers/CCCanonical_sexp/Make/index.html b/dev/containers/CCCanonical_sexp/Make/index.html
index 514c166a..2a274a2c 100644
--- a/dev/containers/CCCanonical_sexp/Make/index.html
+++ b/dev/containers/CCCanonical_sexp/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.CCCanonical_sexp.Make)
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
\ No newline at end of file
diff --git a/dev/containers/CCCanonical_sexp/index.html b/dev/containers/CCCanonical_sexp/index.html
index 19f5b6d8..7e4a001c 100644
--- a/dev/containers/CCCanonical_sexp/index.html
+++ b/dev/containers/CCCanonical_sexp/index.html
@@ -1,2 +1,2 @@
-CCCanonical_sexp (containers.CCCanonical_sexp)
Module CCCanonical_sexp
Canonical S-expressions
See wikipedia. These S-expressions are binary safe.
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val match_ : t->atom:(string ->'a)->list:(t list->'a)->'a
\ No newline at end of file
diff --git a/dev/containers/CCChar/Infix/index.html b/dev/containers/CCChar/Infix/index.html
index 19876731..5a965758 100644
--- a/dev/containers/CCChar/Infix/index.html
+++ b/dev/containers/CCChar/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCChar.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCChar/index.html b/dev/containers/CCChar/index.html
index 48a4ee60..4606f20c 100644
--- a/dev/containers/CCChar/index.html
+++ b/dev/containers/CCChar/index.html
@@ -1,2 +1,2 @@
-CCChar (containers.CCChar)
The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.
The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.
\ No newline at end of file
diff --git a/dev/containers/CCEither/index.html b/dev/containers/CCEither/index.html
index dabba2fe..ebe88ae5 100644
--- a/dev/containers/CCEither/index.html
+++ b/dev/containers/CCEither/index.html
@@ -1,2 +1,4 @@
-CCEither (containers.CCEither)
Module CCEither
Either Monad
Module that is compatible with Either form OCaml 4.12 but can be use with any ocaml version compatible with container
since
3.2
type'a iter = ('a-> unit)-> unit
type'a equal = 'a->'a-> bool
type'a ord = 'a->'a-> int
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers/CCEqual/Infix/index.html b/dev/containers/CCEqual/Infix/index.html
index 0ceb4d77..a3b8b4b3 100644
--- a/dev/containers/CCEqual/Infix/index.html
+++ b/dev/containers/CCEqual/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCEqual.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCEqual/index.html b/dev/containers/CCEqual/index.html
index ea1e05d5..003634df 100644
--- a/dev/containers/CCEqual/index.html
+++ b/dev/containers/CCEqual/index.html
@@ -1,2 +1,2 @@
-CCEqual (containers.CCEqual)
Module CCEqual
Equality Combinators
type'a t = 'a->'a-> bool
Equality function. Must be transitive, symmetric, and reflexive.
map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.
map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.
\ No newline at end of file
diff --git a/dev/containers/CCEqualLabels/Infix/index.html b/dev/containers/CCEqualLabels/Infix/index.html
index 8edcd479..7ab1560f 100644
--- a/dev/containers/CCEqualLabels/Infix/index.html
+++ b/dev/containers/CCEqualLabels/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCEqualLabels.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCEqualLabels/index.html b/dev/containers/CCEqualLabels/index.html
index 4252426d..c759b88c 100644
--- a/dev/containers/CCEqualLabels/index.html
+++ b/dev/containers/CCEqualLabels/index.html
@@ -1,2 +1,2 @@
-CCEqualLabels (containers.CCEqualLabels)
Module CCEqualLabels
Equality Combinators
type'a t = 'a->'a-> bool
Equality function. Must be transitive, symmetric, and reflexive.
map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.
map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.
\ No newline at end of file
diff --git a/dev/containers/CCFloat/Infix/index.html b/dev/containers/CCFloat/Infix/index.html
index f3979005..a22afea3 100644
--- a/dev/containers/CCFloat/Infix/index.html
+++ b/dev/containers/CCFloat/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCFloat.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCFloat/index.html b/dev/containers/CCFloat/index.html
index 43561c26..82164faf 100644
--- a/dev/containers/CCFloat/index.html
+++ b/dev/containers/CCFloat/index.html
@@ -1,2 +1,2 @@
-CCFloat (containers.CCFloat)
\ No newline at end of file
diff --git a/dev/containers/CCFormat/ANSI_codes/index.html b/dev/containers/CCFormat/ANSI_codes/index.html
index f2f865ad..ac56ec32 100644
--- a/dev/containers/CCFormat/ANSI_codes/index.html
+++ b/dev/containers/CCFormat/ANSI_codes/index.html
@@ -1,3 +1,3 @@
-ANSI_codes (containers.CCFormat.ANSI_codes)
Module CCFormat.ANSI_codes
ANSI escape codes. This contains lower level functions for them.
string_of_style_list styles is an escape code for multiple styles at once. For example string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold]) is a very shiny style.
\ No newline at end of file
+ANSI_codes (containers.CCFormat.ANSI_codes)
Module CCFormat.ANSI_codes
ANSI escape codes. This contains lower level functions for them.
string_of_style_list styles is an escape code for multiple styles at once. For example string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold]) is a very shiny style.
\ No newline at end of file
diff --git a/dev/containers/CCFormat/Dump/index.html b/dev/containers/CCFormat/Dump/index.html
index d7d0a085..e8541255 100644
--- a/dev/containers/CCFormat/Dump/index.html
+++ b/dev/containers/CCFormat/Dump/index.html
@@ -1,2 +1,2 @@
-Dump (containers.CCFormat.Dump)
\ No newline at end of file
diff --git a/dev/containers/CCFormat/Infix/index.html b/dev/containers/CCFormat/Infix/index.html
index 7d915770..9e1bbe97 100644
--- a/dev/containers/CCFormat/Infix/index.html
+++ b/dev/containers/CCFormat/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCFormat.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCFormat/index.html b/dev/containers/CCFormat/index.html
index 78735a70..c7afeb02 100644
--- a/dev/containers/CCFormat/index.html
+++ b/dev/containers/CCFormat/index.html
@@ -1,14 +1,19 @@
-CCFormat (containers.CCFormat)
val ksprintf : (string ->'a)->('b, unit, string, 'a) Stdlib.format4->'b
val kasprintf : (string ->'a)->('b, formatter, unit, 'a) Stdlib.format4->'b
val bprintf : Stdlib.Buffer.t ->('a, formatter, unit) Stdlib.format->'a
val kprintf : (string ->'a)->('b, unit, string, 'a) Stdlib.format4->'b
val set_all_formatter_output_functions : out:(string -> int -> int -> unit)->flush:(unit -> unit)->newline:(unit -> unit)->spaces:(int -> unit)-> unit
val get_all_formatter_output_functions : unit ->(string -> int -> int -> unit) * (unit -> unit) * (unit -> unit) * (int -> unit)
val pp_set_all_formatter_output_functions : formatter->out:(string -> int -> int -> unit)->flush:(unit -> unit)->newline:(unit -> unit)->spaces:(int -> unit)-> unit
val pp_get_all_formatter_output_functions : formatter-> unit ->(string -> int -> int -> unit) * (unit -> unit) * (unit -> unit) * (int -> unit)
string_lines out s prints s with all newlines ('\n') replaced by a cut, in a vertical box. It does NOT insert breakable spaces in place of spaces, unlike text. This means an already formatted string can be displayed inside another formatter without mangling the indentation.
string_lines out s prints s with all newlines ('\n') replaced by a cut, in a vertical box. It does NOT insert breakable spaces in place of spaces, unlike text. This means an already formatted string can be displayed inside another formatter without mangling the indentation.
Add functions to support color tags to the given formatter.
since
0.15
val set_color_default : bool -> unit
set_color_default b enables color handling on the standard formatters (stdout, stderr) if b = true as well as on sprintf formatters; it disables the color handling if b = false.
val with_out_chan : Stdlib.out_channel ->(t->'a)->'a
with_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.
Add functions to support color tags to the given formatter.
since 0.15
val set_color_default : bool -> unit
set_color_default b enables color handling on the standard formatters (stdout, stderr) if b = true as well as on sprintf formatters; it disables the color handling if b = false.
val with_out_chan : Stdlib.out_channel ->(t->'a)->'a
with_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.
\ No newline at end of file
diff --git a/dev/containers/CCFun/Infix/index.html b/dev/containers/CCFun/Infix/index.html
index 3fd36580..5e20b544 100644
--- a/dev/containers/CCFun/Infix/index.html
+++ b/dev/containers/CCFun/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCFun.Infix)
Module CCFun.Infix
val (|>) : 'a->('a->'b)->'b
x |> f is the same as f x. A 'pipe' operator.
val (@@) : ('a->'b)->'a->'b
f @@ x is the same as f x, but right-associative.
since
0.5
val (%>) : ('a->'b)->('b->'c)->'a->'c
(f %> g) x or (%>) f g x is g (f x). Alias to compose.
val (%) : ('b->'c)->('a->'b)->'a->'c
(f % g) x or (%) f g x is f (g x). Mathematical composition.
\ No newline at end of file
+Infix (containers.CCFun.Infix)
Module CCFun.Infix
val (|>) : 'a->('a->'b)->'b
x |> f is the same as f x. A 'pipe' operator.
val (@@) : ('a->'b)->'a->'b
f @@ x is the same as f x, but right-associative.
since 0.5
val (%>) : ('a->'b)->('b->'c)->'a->'c
(f %> g) x or (%>) f g x is g (f x). Alias to compose.
val (%) : ('b->'c)->('a->'b)->'a->'c
(f % g) x or (%) f g x is f (g x). Mathematical composition.
\ No newline at end of file
diff --git a/dev/containers/CCFun/Monad/argument-1-X/index.html b/dev/containers/CCFun/Monad/argument-1-X/index.html
index e9f16041..f7cdbfc9 100644
--- a/dev/containers/CCFun/Monad/argument-1-X/index.html
+++ b/dev/containers/CCFun/Monad/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers.CCFun.Monad.1-X)
Parameter Monad.1-X
type t
\ No newline at end of file
+X (containers.CCFun.Monad.1-X)
Parameter Monad.1-X
type t
\ No newline at end of file
diff --git a/dev/containers/CCFun/Monad/index.html b/dev/containers/CCFun/Monad/index.html
index 7bde2fe1..151aa726 100644
--- a/dev/containers/CCFun/Monad/index.html
+++ b/dev/containers/CCFun/Monad/index.html
@@ -1,2 +1,2 @@
-Monad (containers.CCFun.Monad)
\ No newline at end of file
diff --git a/dev/containers/CCFun/index.html b/dev/containers/CCFun/index.html
index 422856a7..fd7f46b9 100644
--- a/dev/containers/CCFun/index.html
+++ b/dev/containers/CCFun/index.html
@@ -1,4 +1,4 @@
-CCFun (containers.CCFun)
val protect : finally:(unit -> unit)->(unit ->'a)->'a
exceptionFinally_raisedof exn
val compose : ('a->'b)->('b->'c)->'a->'c
compose f g x is g (f x). Composition.
val compose_binop : ('a->'b)->('b->'b->'c)->'a->'a->'c
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].
since 0.6
val curry : (('a * 'b)->'c)->'a->'b->'c
curry f x y is f (x,y). Convert a function which accepts a pair of arguments into a function which accepts two arguments.
val uncurry : ('a->'b->'c)->('a * 'b)->'c
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.
val tap : ('a->_)->'a->'a
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)->('a->'a-> int)->'a->'a-> int
Lexicographic combination of comparison functions.
val finally : h:(unit ->_)->f:(unit ->'a)->'a
finally ~h f calls f () and returns its result. If it raises, the same exception is raised; in any case, h () is called after f () terminates. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
val finally1 : h:(unit ->_)->('a->'b)->'a->'b
finally1 ~h f x is the same as f x, but after the computation, h () is called whether f x rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
since
0.16
val finally2 : h:(unit ->_)->('a->'b->'c)->'a->'b->'c
finally2 ~h f x y is the same as f x y, but after the computation, h () is called whether f x y rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
since
0.16
val opaque_identity : 'a->'a
opaque_identity x is like x, but prevents Flambda from using x's definition for optimizing it. (flambda is an optimization/inlining pass in OCaml >= 4.03).
since
0.18
val iterate : int ->('a->'a)->'a->'a
iterate n f is f iterated n times. That is to say, iterate 0 f x is x, iterate 1 f x is f x, iterate 2 f x is f (f x), etc.
(f %> g) x or (%>) f g x is g (f x). Alias to compose.
val (%) : ('b->'c)->('a->'b)->'a->'c
(f % g) x or (%) f g x is f (g x). Mathematical composition.
Monad
Functions with a fixed domain are monads in their codomain.
moduleMonad : functor (X : sig ... end) ->sig ... end
\ No newline at end of file
+|> tap @@ CCArray.sort Stdlib.compare
val lexicographic : ('a->'a-> int)->('a->'a-> int)->'a->'a-> int
Lexicographic combination of comparison functions.
val finally : h:(unit ->_)->f:(unit ->'a)->'a
finally ~h f calls f () and returns its result. If it raises, the same exception is raised; in any case, h () is called after f () terminates. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
val finally1 : h:(unit ->_)->('a->'b)->'a->'b
finally1 ~h f x is the same as f x, but after the computation, h () is called whether f x rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
since 0.16
val finally2 : h:(unit ->_)->('a->'b->'c)->'a->'b->'c
finally2 ~h f x y is the same as f x y, but after the computation, h () is called whether f x y rose an exception or not. If h () raises an exception, then this exception will be passed on and any exception that may have been raised by f () is lost.
since 0.16
val opaque_identity : 'a->'a
opaque_identity x is like x, but prevents Flambda from using x's definition for optimizing it. (flambda is an optimization/inlining pass in OCaml >= 4.03).
since 0.18
val iterate : int ->('a->'a)->'a->'a
iterate n f is f iterated n times. That is to say, iterate 0 f x is x, iterate 1 f x is f x, iterate 2 f x is f (f x), etc.
\ No newline at end of file
diff --git a/dev/containers/CCHash/index.html b/dev/containers/CCHash/index.html
index ce0609f4..ef0a5e90 100644
--- a/dev/containers/CCHash/index.html
+++ b/dev/containers/CCHash/index.html
@@ -1,4 +1,4 @@
-CCHash (containers.CCHash)
Module CCHash
Hash combinators
The API of this module is stable as per semantic versioning, like the rest of containers. However the exact implementation of hashing function can change and should not be relied on (i.e. hashing a value always returns the same integer within a run of a program, not across versions of OCaml and Containers).
Always return 0. Useful for ignoring elements. Example: Hash.(pair string const0) will map pairs ("a", 1) and ("a", 2) to the same hash, but not the same as ("b", 1).
The API of this module is stable as per semantic versioning, like the rest of containers. However the exact implementation of hashing function can change and should not be relied on (i.e. hashing a value always returns the same integer within a run of a program, not across versions of OCaml and Containers).
Always return 0. Useful for ignoring elements. Example: Hash.(pair string const0) will map pairs ("a", 1) and ("a", 2) to the same hash, but not the same as ("b", 1).
\ No newline at end of file
diff --git a/dev/containers/CCHashtbl/Make/index.html b/dev/containers/CCHashtbl/Make/index.html
new file mode 100644
index 00000000..877bd245
--- /dev/null
+++ b/dev/containers/CCHashtbl/Make/index.html
@@ -0,0 +1,3 @@
+
+Make (containers.CCHashtbl.Make)
Module CCHashtbl.Make
Parameters
moduleX : Stdlib.Hashtbl.HashedType
Signature
includeStdlib.Hashtbl.S withtypekey = X.twithtype'a t = 'aStdlib.Hashtbl.Make(X).t
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : 'at->f:(key->'a option->'a option)->k:key-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since 0.13
\ No newline at end of file
diff --git a/dev/containers/CCHashtbl/Poly/index.html b/dev/containers/CCHashtbl/Poly/index.html
index 211435c2..bce3fe5e 100644
--- a/dev/containers/CCHashtbl/Poly/index.html
+++ b/dev/containers/CCHashtbl/Poly/index.html
@@ -1,2 +1,5 @@
-Poly (containers.CCHashtbl.Poly)
Module CCHashtbl.Poly
val get : ('a, 'b) Stdlib.Hashtbl.t->'a->'b option
get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
val get_or : ('a, 'b) Stdlib.Hashtbl.t->'a->default:'b->'b
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
val keys_list : ('a, 'b) Stdlib.Hashtbl.t->'a list
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since
0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since
0.8
val map_list : ('a->'b->'c)->('a, 'b) Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
since
0.16
val decr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since
0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter
Iterate on bindings in the table.
since
2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since
0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since
2.8
val add_iter_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_iter : ('a * 'b)iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order.
since
2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_seq : ('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since
3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t->'aiter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t->'a Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since
3.0
val of_iter_count : 'aiter->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since
2.8
val of_seq_count : 'a Stdlib.Seq.t->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since
3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since
0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since
0.13
\ No newline at end of file
+Poly (containers.CCHashtbl.Poly)
Module CCHashtbl.Poly
val get : ('a, 'b)Stdlib.Hashtbl.t->'a->'b option
get tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
val get_or : ('a, 'b)Stdlib.Hashtbl.t->'a->default:'b->'b
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since 0.8
val values_list : ('a, 'b)Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since 0.8
val map_list : ('a->'b->'c)->('a, 'b)Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
since 0.16
val decr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since 0.16
val to_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter
Iterate on bindings in the table.
since 2.8
val add_list : ('a, 'b list)Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since 0.16
val add_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_seq : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_iter : ('a * 'b)iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order.
since 2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_seq : ('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_iter_count : ('a, int)Stdlib.Hashtbl.t->'aiter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since 2.8
val add_seq_count : ('a, int)Stdlib.Hashtbl.t->'aStdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since 3.0
val of_iter_count : 'aiter->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since 2.8
val of_seq_count : 'aStdlib.Seq.t->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since 3.0
val to_list : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since 0.14
val get_or_add : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since 0.13
\ No newline at end of file
diff --git a/dev/containers/CCHashtbl/index.html b/dev/containers/CCHashtbl/index.html
index 8a342451..ecb23b08 100644
--- a/dev/containers/CCHashtbl/index.html
+++ b/dev/containers/CCHashtbl/index.html
@@ -1,2 +1,6 @@
-CCHashtbl (containers.CCHashtbl)
Module CCHashtbl
Extension to the standard Hashtbl
since
0.4
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a eq = 'a->'a-> bool
type'a hash = 'a-> int
type'a printer = Stdlib.Format.formatter ->'a-> unit
val keys_list : ('a, 'b) Stdlib.Hashtbl.t->'a list
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since
0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since
0.8
val map_list : ('a->'b->'c)->('a, 'b) Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
since
0.16
val decr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since
0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter
Iterate on bindings in the table.
since
2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since
0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since
2.8
val add_iter_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_iter : ('a * 'b)iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order.
since
2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_seq : ('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since
3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t->'aiter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t->'a Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since
3.0
val of_iter_count : 'aiter->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since
2.8
val of_seq_count : 'a Stdlib.Seq.t->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since
3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since
0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since 0.8
val values_list : ('a, 'b)Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since 0.8
val map_list : ('a->'b->'c)->('a, 'b)Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
since 0.16
val decr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since 0.16
val to_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter
Iterate on bindings in the table.
since 2.8
val add_list : ('a, 'b list)Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since 0.16
val add_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_seq : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_iter : ('a * 'b)iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order.
since 2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_seq : ('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_iter_count : ('a, int)Stdlib.Hashtbl.t->'aiter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since 2.8
val add_seq_count : ('a, int)Stdlib.Hashtbl.t->'aStdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since 3.0
val of_iter_count : 'aiter->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since 2.8
val of_seq_count : 'aStdlib.Seq.t->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since 3.0
val to_list : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since 0.14
val get_or_add : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
\ No newline at end of file
diff --git a/dev/containers/CCHashtbl/module-type-S/index.html b/dev/containers/CCHashtbl/module-type-S/index.html
index 8f38088f..237fa912 100644
--- a/dev/containers/CCHashtbl/module-type-S/index.html
+++ b/dev/containers/CCHashtbl/module-type-S/index.html
@@ -1,2 +1,3 @@
-S (containers.CCHashtbl.S)
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
Add the corresponding pairs to the table, using Hashtbl.add.
since
2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : int t->key Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : 'at->f:(key->'a option->'a option)->k:key-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since
0.13
\ No newline at end of file
+S (containers.CCHashtbl.S)
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : 'at->f:(key->'a option->'a option)->k:key-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since 0.13
\ No newline at end of file
diff --git a/dev/containers/CCHeap/Make/argument-1-E/index.html b/dev/containers/CCHeap/Make/argument-1-E/index.html
index c8677d86..5a528344 100644
--- a/dev/containers/CCHeap/Make/argument-1-E/index.html
+++ b/dev/containers/CCHeap/Make/argument-1-E/index.html
@@ -1,2 +1,2 @@
-1-E (containers.CCHeap.Make.1-E)
leq x y shall return true iff x is lower or equal to y.
\ No newline at end of file
diff --git a/dev/containers/CCHeap/Make/index.html b/dev/containers/CCHeap/Make/index.html
index 4461d12b..593fc38e 100644
--- a/dev/containers/CCHeap/Make/index.html
+++ b/dev/containers/CCHeap/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.CCHeap.Make)
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since
0.16
\ No newline at end of file
+Make (containers.CCHeap.Make)
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since 0.16
\ No newline at end of file
diff --git a/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html b/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html
index 37f8cff5..e03d9aa2 100644
--- a/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html
+++ b/dev/containers/CCHeap/Make_from_compare/argument-1-E/index.html
@@ -1,2 +1,2 @@
-1-E (containers.CCHeap.Make_from_compare.1-E)
compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b
\ No newline at end of file
diff --git a/dev/containers/CCHeap/Make_from_compare/index.html b/dev/containers/CCHeap/Make_from_compare/index.html
index 510de24e..c5af84ae 100644
--- a/dev/containers/CCHeap/Make_from_compare/index.html
+++ b/dev/containers/CCHeap/Make_from_compare/index.html
@@ -1,2 +1,2 @@
-Make_from_compare (containers.CCHeap.Make_from_compare)
Module CCHeap.Make_from_compare
A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since
0.16
\ No newline at end of file
+Make_from_compare (containers.CCHeap.Make_from_compare)
Module CCHeap.Make_from_compare
A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since 0.16
\ No newline at end of file
diff --git a/dev/containers/CCHeap/index.html b/dev/containers/CCHeap/index.html
index 58c13c68..05019bf6 100644
--- a/dev/containers/CCHeap/index.html
+++ b/dev/containers/CCHeap/index.html
@@ -1,2 +1,2 @@
-CCHeap (containers.CCHeap)
Module CCHeap
Leftist Heaps
Implementation following Okasaki's book.
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a gen = unit ->'a option
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
type'a printer = Stdlib.Format.formatter ->'a-> unit
A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly
\ No newline at end of file
+CCHeap (containers.CCHeap)
Module CCHeap
Leftist Heaps
Implementation following Okasaki's book.
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since 2.8
type'a gen = unit ->'a option
type'a ktree = unit ->[ `Nil | `Node of 'a * 'aktree list ]
type'a printer = Stdlib.Format.formatter ->'a-> unit
A convenient version of Make that take a TOTAL_ORD instead of a partially ordered module. It allow to directly pass modules that implement compare without implementing leq explicitly
\ No newline at end of file
diff --git a/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html
index 3e5a4232..0cc50dd8 100644
--- a/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html
+++ b/dev/containers/CCHeap/module-type-PARTIAL_ORD/index.html
@@ -1,2 +1,2 @@
-PARTIAL_ORD (containers.CCHeap.PARTIAL_ORD)
leq x y shall return true iff x is lower or equal to y.
\ No newline at end of file
diff --git a/dev/containers/CCHeap/module-type-S/index.html b/dev/containers/CCHeap/module-type-S/index.html
index 05d06b01..e3eacec2 100644
--- a/dev/containers/CCHeap/module-type-S/index.html
+++ b/dev/containers/CCHeap/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers.CCHeap.S)
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since
0.16
\ No newline at end of file
+S (containers.CCHeap.S)
delete_all eq x h uses eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
pp ?pp_start ?pp_stop ?pp_sep ppf h prints h on ppf. Each element is formatted with ppf, 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 ",@ "). Renamed from print since 2.0
since 0.16
\ No newline at end of file
diff --git a/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html b/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html
index 1d742115..8ec67808 100644
--- a/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html
+++ b/dev/containers/CCHeap/module-type-TOTAL_ORD/index.html
@@ -1,2 +1,2 @@
-TOTAL_ORD (containers.CCHeap.TOTAL_ORD)
compare a b shall return a negative value if a is smaller than b, 0 if a and b are equal or a positive value if a is greater than b
\ No newline at end of file
diff --git a/dev/containers/CCIO/File/index.html b/dev/containers/CCIO/File/index.html
index 6d826693..bc0a0dfa 100644
--- a/dev/containers/CCIO/File/index.html
+++ b/dev/containers/CCIO/File/index.html
@@ -1,2 +1,3 @@
-File (containers.CCIO.File)
Module CCIO.File
type t = string
A file should be represented by its absolute path, but currently this is not enforced.
Like read_dir (with recurse=true), this function walks a directory recursively and yields either files or directories. Is a file anything that doesn't satisfy is_directory (including symlinks, etc.)
raises Sys_error
in case of error (e.g. permission denied) during iteration.
val with_temp : ?temp_dir:string->prefix:string->suffix:string->(string ->'a)->'a
with_temp ~prefix ~suffix f will call f with the name of a new temporary file (located in temp_dir). After f returns, the file is deleted. Best to be used in combination with with_out. See Filename.temp_file.
since
0.17
\ No newline at end of file
+File (containers.CCIO.File)
Module CCIO.File
type t = string
A file should be represented by its absolute path, but currently this is not enforced.
Like read_dir (with recurse=true), this function walks a directory recursively and yields either files or directories. Is a file anything that doesn't satisfy is_directory (including symlinks, etc.)
raisesSys_error
in case of error (e.g. permission denied) during iteration.
val with_temp : ?temp_dir:string ->prefix:string ->suffix:string ->
+(string ->'a)->'a
with_temp ~prefix ~suffix f will call f with the name of a new temporary file (located in temp_dir). After f returns, the file is deleted. Best to be used in combination with with_out. See Filename.temp_file.
since 0.17
\ No newline at end of file
diff --git a/dev/containers/CCIO/index.html b/dev/containers/CCIO/index.html
index cfb106a2..9ef16dc8 100644
--- a/dev/containers/CCIO/index.html
+++ b/dev/containers/CCIO/index.html
@@ -1,5 +1,5 @@
-CCIO (containers.CCIO)
Module CCIO
IO Utils
Simple utilities to deal with basic Input/Output tasks in a resource-safe way. For advanced IO tasks, the user is advised to use something like Lwt or Async, that are far more comprehensive.
Examples:
obtain the list of lines of a file:
# let l = CCIO.(with_in "/tmp/some_file" read_lines_l);;
transfer one file into another:
# CCIO.(
+CCIO (containers.CCIO)
Module CCIO
IO Utils
Simple utilities to deal with basic Input/Output tasks in a resource-safe way. For advanced IO tasks, the user is advised to use something like Lwt or Async, that are far more comprehensive.
Examples:
obtain the list of lines of a file:
# let l = CCIO.(with_in "/tmp/some_file" read_lines_l);;
transfer one file into another:
# CCIO.(
with_in "/tmp/input"
(fun ic ->
let chunks = read_chunks_gen ic in
@@ -8,7 +8,7 @@
write_gen oc chunks
)
)
- ) ;;
Note that the lifetime of an IO generator is tied to the underlying channel. In the example above, chunks must be used in the scope of ic. This will raise an error:
# CCIO.(
+ ) ;;
Note that the lifetime of an IO generator is tied to the underlying channel. In the example above, chunks must be used in the scope of ic. This will raise an error:
val with_in : ?mode:int->?flags:Stdlib.open_flag list-> string ->(Stdlib.in_channel ->'a)->'a
Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.
raises Sys_error
in case of error (same as open_in and close_in).
parameter flags
opening flags (default [Open_text]). Open_rdonly is used in any cases.
val read_chunks_gen : ?size:int-> Stdlib.in_channel ->string gen
Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
val read_chunks_seq : ?size:int-> Stdlib.in_channel ->string Stdlib.Seq.t
Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
since
3.5
val read_chunks_iter : ?size:int-> Stdlib.in_channel ->string iter
Read the channel's content into chunks of size at most size
since
NEXT_RELEASE
val read_line : Stdlib.in_channel ->string option
Read a line from the channel. Returns None if the input is terminated. The "\n" is removed from the line.
val read_lines_gen : Stdlib.in_channel ->string gen
Read all lines. The generator should be traversed only once. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
val read_lines_seq : Stdlib.in_channel ->string Stdlib.Seq.t
Read all lines. NOTE the seq must be used within the lifetime of the channel, see warning at the top of the file.
since
3.5
val read_lines_iter : Stdlib.in_channel ->string iter
Read all lines.
since
NEXT_RELEASE
val read_lines_l : Stdlib.in_channel ->string list
Read all lines into a list.
val read_all : ?size:int-> Stdlib.in_channel -> string
Read the whole channel into a buffer, then converted into a string.
parameter size
the internal buffer size.
since
0.7
val read_all_bytes : ?size:int-> Stdlib.in_channel -> Stdlib.Bytes.t
Read the whole channel into a mutable byte array.
parameter size
the internal buffer size.
since
0.12
Output
val with_out : ?mode:int->?flags:Stdlib.open_flag list-> string ->(Stdlib.out_channel ->'a)->'a
tee funs gen behaves like gen, but each element is given to every function f in funs at the time the element is produced. The returned generator will raise any exception that f raises
val with_in : ?mode:int ->?flags:Stdlib.open_flag list->
+string ->(Stdlib.in_channel ->'a)->'a
Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.
raisesSys_error
in case of error (same as open_in and close_in).
parameterflags
opening flags (default [Open_text]). Open_rdonly is used in any cases.
val read_chunks_gen : ?size:int ->Stdlib.in_channel ->string gen
Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
val read_chunks_seq : ?size:int ->Stdlib.in_channel ->string Stdlib.Seq.t
Read the channel's content into chunks of size at most size. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
since 3.5
val read_chunks_iter : ?size:int ->Stdlib.in_channel ->string iter
Read the channel's content into chunks of size at most size
since 3.6
val read_line : Stdlib.in_channel ->string option
Read a line from the channel. Returns None if the input is terminated. The "\n" is removed from the line.
val read_lines_gen : Stdlib.in_channel ->string gen
Read all lines. The generator should be traversed only once. NOTE the generator must be used within the lifetime of the channel, see warning at the top of the file.
val read_lines_seq : Stdlib.in_channel ->string Stdlib.Seq.t
Read all lines. NOTE the seq must be used within the lifetime of the channel, see warning at the top of the file.
since 3.5
val read_lines_iter : Stdlib.in_channel ->string iter
Read all lines.
since 3.6
val read_lines_l : Stdlib.in_channel ->string list
Read all lines into a list.
val read_all : ?size:int ->Stdlib.in_channel -> string
Read the whole channel into a buffer, then converted into a string.
parametersize
the internal buffer size.
since 0.7
val read_all_bytes : ?size:int ->Stdlib.in_channel ->Stdlib.Bytes.t
Read the whole channel into a mutable byte array.
parametersize
the internal buffer size.
since 0.12
Output
val with_out : ?mode:int ->?flags:Stdlib.open_flag list->
+string ->(Stdlib.out_channel ->'a)->'a
tee funs gen behaves like gen, but each element is given to every function f in funs at the time the element is produced. The returned generator will raise any exception that f raises
\ No newline at end of file
diff --git a/dev/containers/CCInt/Infix/index.html b/dev/containers/CCInt/Infix/index.html
index 5c8c3ad1..faa3f116 100644
--- a/dev/containers/CCInt/Infix/index.html
+++ b/dev/containers/CCInt/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCInt.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCInt/index.html b/dev/containers/CCInt/index.html
index e615c8e3..256f7725 100644
--- a/dev/containers/CCInt/index.html
+++ b/dev/containers/CCInt/index.html
@@ -1,2 +1,2 @@
-CCInt (containers.CCInt)
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.
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.
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.
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.
\ No newline at end of file
diff --git a/dev/containers/CCInt32/Infix/index.html b/dev/containers/CCInt32/Infix/index.html
index 654fc1ff..b508aa6f 100644
--- a/dev/containers/CCInt32/Infix/index.html
+++ b/dev/containers/CCInt32/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCInt32.Infix)
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.
\ No newline at end of file
diff --git a/dev/containers/CCInt32/index.html b/dev/containers/CCInt32/index.html
index 5d8115d6..7c91f325 100644
--- a/dev/containers/CCInt32/index.html
+++ b/dev/containers/CCInt32/index.html
@@ -1,2 +1,2 @@
-CCInt32 (containers.CCInt32)
Module CCInt32
Int32
Helpers for 32-bit integers.
This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.
Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.
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.
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.
of_string_exn s converts the given string s into a 32-bit integer. Alias to Int32.of_string. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCInt32.max_int+1]. If the input exceeds CCInt32.max_int it is converted to the signed integer CCInt32.min_int + input - CCInt32.max_int - 1.
The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int32.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.
\ No newline at end of file
+CCInt32 (containers.CCInt32)
Module CCInt32
Int32
Helpers for 32-bit integers.
This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.
Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.
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.
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.
of_string_exn s converts the given string s into a 32-bit integer. Alias to Int32.of_string. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCInt32.max_int+1]. If the input exceeds CCInt32.max_int it is converted to the signed integer CCInt32.min_int + input - CCInt32.max_int - 1.
The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int32.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.
\ No newline at end of file
diff --git a/dev/containers/CCInt64/Infix/index.html b/dev/containers/CCInt64/Infix/index.html
index 39dfc607..7c7e34d6 100644
--- a/dev/containers/CCInt64/Infix/index.html
+++ b/dev/containers/CCInt64/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCInt64.Infix)
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.
\ No newline at end of file
diff --git a/dev/containers/CCInt64/index.html b/dev/containers/CCInt64/index.html
index 4b9bfcb7..6645fb32 100644
--- a/dev/containers/CCInt64/index.html
+++ b/dev/containers/CCInt64/index.html
@@ -1,2 +1,2 @@
-CCInt64 (containers.CCInt64)
Module CCInt64
Int64
Helpers for 64-bit integers.
This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264.
Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.
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.
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.
of_string_exn s converts the given string s into a 64-bit integer. Alias to Int64.of_string. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCInt64.max_int+1]. If the input exceeds CCInt64.max_int it is converted to the signed integer CCInt64.min_int + input - CCInt64.max_int - 1.
The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int64.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.
\ No newline at end of file
+CCInt64 (containers.CCInt64)
Module CCInt64
Int64
Helpers for 64-bit integers.
This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264.
Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.
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.
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.
of_string_exn s converts the given string s into a 64-bit integer. Alias to Int64.of_string. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCInt64.max_int+1]. If the input exceeds CCInt64.max_int it is converted to the signed integer CCInt64.min_int + input - CCInt64.max_int - 1.
The _ (underscore) character can appear anywhere in the string and is ignored. Raise Failure "Int64.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.
\ No newline at end of file
diff --git a/dev/containers/CCList/Assoc/index.html b/dev/containers/CCList/Assoc/index.html
index 9cc7483b..ac74a5ad 100644
--- a/dev/containers/CCList/Assoc/index.html
+++ b/dev/containers/CCList/Assoc/index.html
@@ -1,2 +1,3 @@
-Assoc (containers.CCList.Assoc)
Module CCList.Assoc
type('a, 'b) t = ('a * 'b) list
val get : eq:('a->'a-> bool)->'a->('a, 'b)t->'b option
get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.
val get_exn : eq:('a->'a-> bool)->'a->('a, 'b)t->'b
get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
raises Not_found
if the element is not present.
val set : eq:('a->'a-> bool)->'a->'b->('a, 'b)t->('a, 'b)t
set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).
val mem : ?eq:('a->'a-> bool)->'a->('a, _)t-> bool
mem ?eq k alist returns true iff k is a key in alist.
since
0.16
val update : eq:('a->'a-> bool)->f:('b option->'b option)->'a->('a, 'b)t->('a, 'b)t
update ~eq ~f k alist updates alist on the key k, by calling f (get k alist) and removing k if it returns None, mapping k to v' if it returns Some v'.
since
0.16
val remove : eq:('a->'a-> bool)->'a->('a, 'b)t->('a, 'b)t
remove ~eq k alist returns the alist without the first pair with key k, if any.
since
0.17
\ No newline at end of file
+Assoc (containers.CCList.Assoc)
Module CCList.Assoc
type('a, 'b) t = ('a * 'b) list
val get : eq:('a->'a-> bool)->'a->('a, 'b)t->'b option
get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.
val get_exn : eq:('a->'a-> bool)->'a->('a, 'b)t->'b
get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
raisesNot_found
if the element is not present.
val set : eq:('a->'a-> bool)->'a->'b->('a, 'b)t->('a, 'b)t
set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).
val mem : ?eq:('a->'a-> bool)->'a->('a, _)t-> bool
mem ?eq k alist returns true iff k is a key in alist.
since 0.16
val update : eq:('a->'a-> bool)->f:('b option->'b option)->
+'a->('a, 'b)t->('a, 'b)t
update ~eq ~f k alist updates alist on the key k, by calling f (get k alist) and removing k if it returns None, mapping k to v' if it returns Some v'.
since 0.16
val remove : eq:('a->'a-> bool)->'a->('a, 'b)t->('a, 'b)t
remove ~eq k alist returns the alist without the first pair with key k, if any.
since 0.17
\ No newline at end of file
diff --git a/dev/containers/CCList/Infix/index.html b/dev/containers/CCList/Infix/index.html
index 47b5a52b..3ff3f324 100644
--- a/dev/containers/CCList/Infix/index.html
+++ b/dev/containers/CCList/Infix/index.html
@@ -1,9 +1,9 @@
-Infix (containers.CCList.Infix)
(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)
(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]
since
3.1
\ No newline at end of file
+- : int list = [16; 18]
since 3.1
\ No newline at end of file
diff --git a/dev/containers/CCList/Ref/index.html b/dev/containers/CCList/Ref/index.html
index 5a3e6aa8..44121db7 100644
--- a/dev/containers/CCList/Ref/index.html
+++ b/dev/containers/CCList/Ref/index.html
@@ -1,2 +1,2 @@
-Ref (containers.CCList.Ref)
push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.
\ No newline at end of file
+Ref (containers.CCList.Ref)
push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.
\ No newline at end of file
diff --git a/dev/containers/CCList/Traverse/argument-1-M/index.html b/dev/containers/CCList/Traverse/argument-1-M/index.html
index 6b173896..f35a313a 100644
--- a/dev/containers/CCList/Traverse/argument-1-M/index.html
+++ b/dev/containers/CCList/Traverse/argument-1-M/index.html
@@ -1,2 +1,2 @@
-1-M (containers.CCList.Traverse.1-M)
\ No newline at end of file
diff --git a/dev/containers/CCList/Traverse/index.html b/dev/containers/CCList/Traverse/index.html
index 05a292dd..d51df71f 100644
--- a/dev/containers/CCList/Traverse/index.html
+++ b/dev/containers/CCList/Traverse/index.html
@@ -1,2 +1,2 @@
-Traverse (containers.CCList.Traverse)
Module CCList.Traverse
Monadic Traverse
This allows the traversal of a 'a t list where _ t is also a monad.
For example, a 'a option list will be traversed by extracting a value from each option, returning Some [x1;…;x_n]; but if one of the option is None then the whole result is None.
Another example is with result: ('a, 'err) result list can be transformed into ('a list, 'err) result by returning the first error, or Ok [x1; …; xn] if all the elements were successful.
This describes the behavior of sequence_m; map_m is a combination of map and sequence_m; map_m_par is like map_m but useful for some pseudo monads like Lwt.
map_m_par f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).
Basically, when encoutering x :: tl, this computes f x and map_m_par f tl, and only then is M.(>>=) used to combine the two results into a new list.
\ No newline at end of file
+Traverse (containers.CCList.Traverse)
Module CCList.Traverse
Monadic Traverse
This allows the traversal of a 'a t list where _ t is also a monad.
For example, a 'a option list will be traversed by extracting a value from each option, returning Some [x1;…;x_n]; but if one of the option is None then the whole result is None.
Another example is with result: ('a, 'err) result list can be transformed into ('a list, 'err) result by returning the first error, or Ok [x1; …; xn] if all the elements were successful.
This describes the behavior of sequence_m; map_m is a combination of map and sequence_m; map_m_par is like map_m but useful for some pseudo monads like Lwt.
map_m_par f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).
Basically, when encoutering x :: tl, this computes f x and map_m_par f tl, and only then is M.(>>=) used to combine the two results into a new list.
\ No newline at end of file
diff --git a/dev/containers/CCList/index.html b/dev/containers/CCList/index.html
index 50ea0338..c168ccfe 100644
--- a/dev/containers/CCList/index.html
+++ b/dev/containers/CCList/index.html
@@ -1,12 +1,18 @@
-CCList (containers.CCList)
Module CCList
Complements to list
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
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_map2 : ('acc->'a->'b->'acc * 'c)->'acc->'a list->'b list->'acc * 'c list
fold_map2 f init l1 l2 is to fold_map what List.map2 is to List.map.
raises Invalid_argument
if the lists do not have the same length.
since
0.16
val fold_filter_map : ('acc->'a->'acc * 'b option)->'acc->'a list->'acc * 'b list
fold_filter_map f init l is a fold_left-like function, but also generates a list of output in a way similar to filter_map.
since
0.17
val fold_filter_map_i : ('acc-> int ->'a->'acc * 'b option)->'acc->'a list->'acc * 'b list
fold_filter_map_i f init l is a foldi-like function, but also generates a list of output in a way similar to filter_map.
since
2.8
val fold_flat_map : ('acc->'a->'acc * 'b list)->'acc->'a list->'acc * 'b list
fold_flat_map f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since
0.14
val fold_flat_map_i : ('acc-> int ->'a->'acc * 'b list)->'acc->'a list->'acc * 'b list
fold_flat_map_i f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since
2.8
val count : ('a-> bool)->'a list-> int
count p l counts how many elements of l satisfy predicate p.
since
1.5, but only
since
2.2 with labels
val count_true_false : ('a-> bool)->'a list-> int * int
count_true_false p l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate p, and int2 the number of elements that do not satisfy p.
combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.
since
1.2, but only
since
2.2 with labels
val combine_shortest : 'a list->'b list->('a * 'b) list
combine_shortest [a1; …; am] [b1; …; bn] is [(a1,b1); …; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.
cartesian_product [[l1]; [l2]; …; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:
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_map2 : ('acc->'a->'b->'acc * 'c)->'acc->'a list->'b list->'acc * 'c list
fold_map2 f init l1 l2 is to fold_map what List.map2 is to List.map.
raisesInvalid_argument
if the lists do not have the same length.
since 0.16
val fold_filter_map : ('acc->'a->'acc * 'b option)->'acc->'a list->'acc * 'b list
fold_filter_map f init l is a fold_left-like function, but also generates a list of output in a way similar to filter_map.
since 0.17
val fold_filter_map_i : ('acc->int ->'a->'acc * 'b option)->'acc->'a list->'acc * 'b list
fold_filter_map_i f init l is a foldi-like function, but also generates a list of output in a way similar to filter_map.
since 2.8
val fold_flat_map : ('acc->'a->'acc * 'b list)->'acc->'a list->'acc * 'b list
fold_flat_map f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since 0.14
val fold_flat_map_i : ('acc->int ->'a->'acc * 'b list)->'acc->'a list->'acc * 'b list
fold_flat_map_i f init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since 2.8
val count : ('a-> bool)->'a list-> int
count p l counts how many elements of l satisfy predicate p.
since 1.5, but only
since 2.2 with labels
val count_true_false : ('a-> bool)->'a list-> int * int
count_true_false p l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate p, and int2 the number of elements that do not satisfy p.
combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.
since 1.2, but only
since 2.2 with labels
val combine_shortest : 'a list->'b list->('a * 'b) list
combine_shortest [a1; …; am] [b1; …; bn] is [(a1,b1); …; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.
cartesian_product [[l1]; [l2]; …; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:
invariant: cartesian_product l = map_product id l.
since
1.2, but only
since
2.2 with labels
val map_product_l : ('a->'b list)->'a list->'b list list
map_product_l f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; …; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.
val group_by : ?hash:('a-> int)->?eq:('a->'a-> bool)->'at->'a listt
group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x=hash y must hold.
since
2.3
val join : join_row:('a->'b->'c option)->'at->'bt->'ct
join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.
since
2.3
val join_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->('a->'key)->('b->'key)->merge:('key->'a->'b->'c option)->'at->'bt->'ct
join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x=hash y must hold.
since
2.3
val join_all_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->('a->'key)->('b->'key)->merge:('key->'a list->'b list->'c option)->'at->'bt->'ct
join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:
compute the list l1 of elements of a that map to k
compute the list l2 of elements of b that map to k
call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
since
2.3
val group_join_by : ?eq:('a->'a-> bool)->?hash:('a-> int)->('b->'a)->'at->'bt->('a * 'b list)t
group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x=hash y must hold.
since
2.3
val sublists_of_len : ?last:('a list->'a list option)->?offset:int-> int ->'a list->'a list list
sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].
the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.
parameter last
if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.
since
3.2
val intersperse : 'a->'a list->'a list
intersperse x l inserts the element x between adjacent elements of the list l.
since
2.1, but only
since
2.2 with labels
val interleave : 'a list->'a list->'a list
interleave [x1…xn] [y1…ym] is [x1;y1;x2;y2;…] and finishes with the suffix of the longest list.
mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:
# let square_even xs =
+[[1;3;4;5;6];[2;3;4;5;6]];;
invariant: cartesian_product l = map_product id l.
since 1.2, but only
since 2.2 with labels
val map_product_l : ('a->'b list)->'a list->'b list list
map_product_l f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; …; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.
diagonal l returns all pairs of distinct positions of the list l, that is the list of List.nth i l, List.nth j l if i < j.
val partition_map_either : ('a->('b, 'c)CCEither.t)->'a list->'b list * 'c list
partition_map_either f l maps f on l and gather results in lists:
if f x = Left y, adds y to the first list.
if f x = Right z, adds z to the second list.
since 3.3
val partition_filter_map : ('a->[< `Left of 'b| `Right of 'c| `Drop ])->'a list->'b list * 'c list
partition_filter_map f l maps f on l and gather results in lists:
if f x = `Left y, adds y to the first list.
if f x = `Right z, adds z to the second list.
if f x = `Drop, ignores x.
since 3.3
val partition_map : ('a->[< `Left of 'b| `Right of 'c| `Drop ])->'a list->'b list * 'c list
deprecated
use partition_filter_map instead
since 0.11
val group_by : ?hash:('a-> int)->?eq:('a->'a-> bool)->'at->'a listt
group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x=hash y must hold.
since 2.3
val join : join_row:('a->'b->'c option)->'at->'bt->'ct
join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.
since 2.3
val join_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->
+('a->'key)->('b->'key)->merge:('key->'a->'b->'c option)->'at->'bt->'ct
join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x=hash y must hold.
join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:
compute the list l1 of elements of a that map to k
compute the list l2 of elements of b that map to k
call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
since 2.3
val group_join_by : ?eq:('a->'a-> bool)->?hash:('a-> int)->
+('b->'a)->'at->'bt->('a * 'b list)t
group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x=hash y must hold.
since 2.3
val sublists_of_len : ?last:('a list->'a list option)->?offset:int ->
+int ->'a list->'a list list
sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].
the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.
parameterlast
if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
raisesInvalid_argument
if offset <= 0 or n <= 0. See CCList.sublists_of_len for more details.
since 1.0, but only
since 1.5 with labels
val chunks : int ->'a list->'a list list
chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.
since 3.2
val intersperse : 'a->'a list->'a list
intersperse x l inserts the element x between adjacent elements of the list l.
since 2.1, but only
since 2.2 with labels
val interleave : 'a list->'a list->'a list
interleave [x1…xn] [y1…ym] is [x1;y1;x2;y2;…] and finishes with the suffix of the longest list.
mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:
# let square_even xs =
let* x = xs in
let* () = mguard (x mod 2 = 0) in
return @@ x * x;;
val square_even : int list -> int list = <fun>
# square_even [1;2;4;3;5;2];;
-- : int list = [4; 16; 4]
all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.
since
1.3, but only
since
2.2 with labels
val all_ok : ('a, 'err) Stdlib.resultt->('at, 'err) Stdlib.result
all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).
since
1.3, but only
since
2.2 with labels
val sorted_mem : cmp:('a->'a-> int)->'a->'a list-> bool
sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.
since
3.5
val sorted_merge : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.
val sorted_diff : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.
since
3.5
val sort_uniq : cmp:('a->'a-> int)->'a list->'a list
sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.
val sorted_merge_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.
since
0.10
val sorted_diff_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.
since
3.5
val is_sorted : cmp:('a->'a-> int)->'a list-> bool
is_sorted ~cmp l returns true iff l is sorted (according to given order).
parameter cmp
the comparison function.
since
0.17
val sorted_insert : cmp:('a->'a-> int)->?uniq:bool->'a->'a list->'a list
sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.
parameter uniq
if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).
since
0.17
val sorted_remove : cmp:('a->'a-> int)->?all:bool->'a->'a list->'a list
sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.
parameter all
if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).
since
3.5
val uniq_succ : eq:('a->'a-> bool)->'a list->'a list
uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ ~eq:(=) [1;2;1] = [1;2;1]. uniq_succ ~eq:(=) [1;1;2] = [1;2].
since
0.10
val group_succ : eq:('a->'a-> bool)->'a list->'a list list
group_succ ~eq l groups together consecutive elements that are equal according to eq.
mapi f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
iteri f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
val iteri2 : (int ->'a->'b-> unit)->'at->'bt-> unit
iteri2 f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.
foldi f init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.
val foldi2 : ('c-> int ->'a->'b->'c)->'c->'at->'bt->'c
foldi2 f init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(… (f init i_0 l1_0 l2_0) …) i_n l1_n l2_n .
get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.
set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.
insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.
remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.
Set Operators
Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).
uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.
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.
assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.
since
1.5, but only
since
2.0 with labels
val mem_assoc : ?eq:('a->'a-> bool)->'a->('a * _)t-> bool
mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.
since
2.0
val remove_assoc : eq:('a->'a-> bool)->'a->('a * 'b)t->('a * 'b)t
remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.
of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.
since 1.3, but only
since 2.2 with labels
val all_ok : ('a, 'err)Stdlib.resultt->('at, 'err)Stdlib.result
all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).
since 1.3, but only
since 2.2 with labels
val sorted_mem : cmp:('a->'a-> int)->'a->'a list-> bool
sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.
since 3.5
val sorted_merge : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.
val sorted_diff : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.
since 3.5
val sort_uniq : cmp:('a->'a-> int)->'a list->'a list
sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.
val sorted_merge_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.
since 0.10
val sorted_diff_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.
since 3.5
val is_sorted : cmp:('a->'a-> int)->'a list-> bool
is_sorted ~cmp l returns true iff l is sorted (according to given order).
parametercmp
the comparison function.
since 0.17
val sorted_insert : cmp:('a->'a-> int)->?uniq:bool ->'a->'a list->'a list
sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.
parameteruniq
if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).
since 0.17
val sorted_remove : cmp:('a->'a-> int)->?all:bool ->'a->'a list->'a list
sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.
parameterall
if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).
since 3.5
val uniq_succ : eq:('a->'a-> bool)->'a list->'a list
uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ ~eq:(=) [1;2;1] = [1;2;1]. uniq_succ ~eq:(=) [1;1;2] = [1;2].
since 0.10
val group_succ : eq:('a->'a-> bool)->'a list->'a list list
group_succ ~eq l groups together consecutive elements that are equal according to eq.
mapi f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
iteri f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
val iteri2 : (int ->'a->'b-> unit)->'at->'bt-> unit
iteri2 f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.
foldi f init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.
val foldi2 : ('c->int ->'a->'b->'c)->'c->'at->'bt->'c
foldi2 f init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(… (f init i_0 l1_0 l2_0) …) i_n l1_n l2_n .
get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.
set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.
insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.
remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.
Set Operators
Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).
uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.
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.
assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.
since 1.5, but only
since 2.0 with labels
val mem_assoc : ?eq:('a->'a-> bool)->'a->('a * _)t-> bool
mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.
since 2.0
val remove_assoc : eq:('a->'a-> bool)->'a->('a * 'b)t->('a * 'b)t
remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.
of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.
\ No newline at end of file
diff --git a/dev/containers/CCList/module-type-MONAD/index.html b/dev/containers/CCList/module-type-MONAD/index.html
index ecdfae32..77f5a0c5 100644
--- a/dev/containers/CCList/module-type-MONAD/index.html
+++ b/dev/containers/CCList/module-type-MONAD/index.html
@@ -1,2 +1,2 @@
-MONAD (containers.CCList.MONAD)
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/Assoc/index.html b/dev/containers/CCListLabels/Assoc/index.html
index f4ab1a08..694cc48a 100644
--- a/dev/containers/CCListLabels/Assoc/index.html
+++ b/dev/containers/CCListLabels/Assoc/index.html
@@ -1,2 +1,3 @@
-Assoc (containers.CCListLabels.Assoc)
Module CCListLabels.Assoc
type('a, 'b) t = ('a * 'b) list
val get : eq:('a->'a-> bool)->'a->('a, 'b)t->'b option
get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.
val get_exn : eq:('a->'a-> bool)->'a->('a, 'b)t->'b
get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
raises Not_found
if the element is not present.
val set : eq:('a->'a-> bool)->'a->'b->('a, 'b)t->('a, 'b)t
set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).
val mem : ?eq:('a->'a-> bool)->'a->('a, _)t-> bool
mem ?eq k alist returns true iff k is a key in alist.
since
0.16
val update : eq:('a->'a-> bool)->f:('b option->'b option)->'a->('a, 'b)t->('a, 'b)t
update ~eq ~f k alist updates alist on the key k, by calling f (get alist k) and removing k if it returns None, mapping k to v' if it returns Some v'.
since
0.16
val remove : eq:('a->'a-> bool)->'a->('a, 'b)t->('a, 'b)t
remove ~eq k alist returns the alist without the first pair with key k, if any.
since
0.17
\ No newline at end of file
+Assoc (containers.CCListLabels.Assoc)
Module CCListLabels.Assoc
type('a, 'b) t = ('a * 'b) list
val get : eq:('a->'a-> bool)->'a->('a, 'b)t->'b option
get ~eq k alist returns Some v if the given key k is present into alist, or None if not present.
val get_exn : eq:('a->'a-> bool)->'a->('a, 'b)t->'b
get_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
raisesNot_found
if the element is not present.
val set : eq:('a->'a-> bool)->'a->'b->('a, 'b)t->('a, 'b)t
set ~eq k v alist adds the binding k, v into the list alist (erase it if already present).
val mem : ?eq:('a->'a-> bool)->'a->('a, _)t-> bool
mem ?eq k alist returns true iff k is a key in alist.
since 0.16
val update : eq:('a->'a-> bool)->f:('b option->'b option)->
+'a->('a, 'b)t->('a, 'b)t
update ~eq ~f k alist updates alist on the key k, by calling f (get alist k) and removing k if it returns None, mapping k to v' if it returns Some v'.
since 0.16
val remove : eq:('a->'a-> bool)->'a->('a, 'b)t->('a, 'b)t
remove ~eq k alist returns the alist without the first pair with key k, if any.
since 0.17
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/Infix/index.html b/dev/containers/CCListLabels/Infix/index.html
index 92a2d9cf..a1f2d7d9 100644
--- a/dev/containers/CCListLabels/Infix/index.html
+++ b/dev/containers/CCListLabels/Infix/index.html
@@ -1,9 +1,9 @@
-Infix (containers.CCListLabels.Infix)
(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)
(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]
since
3.1
\ No newline at end of file
+- : int list = [16; 18]
since 3.1
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/Ref/index.html b/dev/containers/CCListLabels/Ref/index.html
index 40323245..828ddfce 100644
--- a/dev/containers/CCListLabels/Ref/index.html
+++ b/dev/containers/CCListLabels/Ref/index.html
@@ -1,2 +1,2 @@
-Ref (containers.CCListLabels.Ref)
push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.
\ No newline at end of file
+Ref (containers.CCListLabels.Ref)
push_list rlist l adds elements of the list l at the beginning of the list ref rlist. Elements at the end of the list l will be at the beginning of the list ref rlist.
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/Traverse/argument-1-M/index.html b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html
index 61de6841..4d84ec73 100644
--- a/dev/containers/CCListLabels/Traverse/argument-1-M/index.html
+++ b/dev/containers/CCListLabels/Traverse/argument-1-M/index.html
@@ -1,2 +1,2 @@
-1-M (containers.CCListLabels.Traverse.1-M)
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/Traverse/index.html b/dev/containers/CCListLabels/Traverse/index.html
index 9b997689..25a43d7f 100644
--- a/dev/containers/CCListLabels/Traverse/index.html
+++ b/dev/containers/CCListLabels/Traverse/index.html
@@ -1,2 +1,2 @@
-Traverse (containers.CCListLabels.Traverse)
map_m_par ~f (x :: l) is like map_m but f x and f l are evaluated "in parallel" before combining their result (for instance in Lwt).
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/index.html b/dev/containers/CCListLabels/index.html
index e7727757..af6dde92 100644
--- a/dev/containers/CCListLabels/index.html
+++ b/dev/containers/CCListLabels/index.html
@@ -1,12 +1,27 @@
-CCListLabels (containers.CCListLabels)
Module CCListLabels
Complements to list
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a gen = unit ->'a option
type'a printer = Stdlib.Format.formatter ->'a-> unit
filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list l is preserved. Safe version of List.filter.
val fold_map2 : f:('acc->'a->'b->'acc * 'c)->init:'acc->'a list->'b list->'acc * 'c list
fold_map2 ~f ~init l1 l2 is to fold_map what List.map2 is to List.map.
raises Invalid_argument
if the lists do not have the same length.
since
0.16
val fold_filter_map : f:('acc->'a->'acc * 'b option)->init:'acc->'a list->'acc * 'b list
fold_filter_map ~f ~init l is a fold_left-like function, but also generates a list of output in a way similar to filter_map.
since
0.17
val fold_filter_map_i : f:('acc-> int ->'a->'acc * 'b option)->init:'acc->'a list->'acc * 'b list
fold_filter_map_i ~f ~init l is a foldi-like function, but also generates a list of output in a way similar to filter_map.
since
2.8
val fold_flat_map : f:('acc->'a->'acc * 'b list)->init:'acc->'a list->'acc * 'b list
fold_flat_map ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since
0.14
val fold_flat_map_i : f:('acc-> int ->'a->'acc * 'b list)->init:'acc->'a list->'acc * 'b list
fold_flat_map_i ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since
2.8
val count : f:('a-> bool)->'a list-> int
count ~f l counts how many elements of l satisfy predicate f.
since
1.5, but only
since
2.2 with labels
val count_true_false : f:('a-> bool)->'a list-> int * int
count_true_false ~f l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate f, and int2 the number of elements that do not satisfy f.
combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.
since
1.2, but only
since
2.2 with labels
val combine_shortest : 'a list->'b list->('a * 'b) list
combine_shortest [a1; …; am] [b1; …; bn] is [(a1,b1); …; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.
cartesian_product [[l1];[l2]; …; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:
filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list l is preserved. Safe version of List.filter.
val fold_map2 : f:('acc->'a->'b->'acc * 'c)->init:'acc->
+'a list->'b list->'acc * 'c list
fold_map2 ~f ~init l1 l2 is to fold_map what List.map2 is to List.map.
raisesInvalid_argument
if the lists do not have the same length.
since 0.16
val fold_filter_map : f:('acc->'a->'acc * 'b option)->init:'acc->
+'a list->'acc * 'b list
fold_filter_map ~f ~init l is a fold_left-like function, but also generates a list of output in a way similar to filter_map.
since 0.17
val fold_filter_map_i : f:('acc->int ->'a->'acc * 'b option)->init:'acc->
+'a list->'acc * 'b list
fold_filter_map_i ~f ~init l is a foldi-like function, but also generates a list of output in a way similar to filter_map.
since 2.8
val fold_flat_map : f:('acc->'a->'acc * 'b list)->init:'acc->
+'a list->'acc * 'b list
fold_flat_map ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since 0.14
val fold_flat_map_i : f:('acc->int ->'a->'acc * 'b list)->init:'acc->
+'a list->'acc * 'b list
fold_flat_map_i ~f ~init l is a fold_left-like function, but it also maps the list to a list of lists that is then flatten'd.
since 2.8
val count : f:('a-> bool)->'a list-> int
count ~f l counts how many elements of l satisfy predicate f.
since 1.5, but only
since 2.2 with labels
val count_true_false : f:('a-> bool)->'a list-> int * int
count_true_false ~f l returns a pair (int1,int2) where int1 is the number of elements in l that satisfy the predicate f, and int2 the number of elements that do not satisfy f.
combine_gen l1 l2 transforms two lists into a gen of pairs. Lazy version of combine. Unlike combine, it does not fail if the lists have different lengths; instead, the output has as many pairs as the smallest input list.
since 1.2, but only
since 2.2 with labels
val combine_shortest : 'a list->'b list->('a * 'b) list
combine_shortest [a1; …; am] [b1; …; bn] is [(a1,b1); …; (am,bm)] if m <= n. Like combine but stops at the shortest list rather than raising.
cartesian_product [[l1];[l2]; …; [ln]] produces the cartesian product of this list of lists, by returning all the ways of picking one element per sublist. NOTE the order of the returned list is unspecified. For example:
invariant: cartesian_product l = map_product id l.
since
1.2, but only
since
2.2 with labels
val map_product_l : f:('a->'b list)->'a list->'b list list
map_product_l ~f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; …; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.
val group_by : ?hash:('a-> int)->?eq:('a->'a-> bool)->'at->'a listt
group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x = hash y must hold.
since
2.3
val join : join_row:('a->'b->'c option)->'at->'bt->'ct
join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.
since
2.3
val join_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->('a->'key)->('b->'key)->merge:('key->'a->'b->'c option)->'at->'bt->'ct
join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x = hash y must hold.
since
2.3
val join_all_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->('a->'key)->('b->'key)->merge:('key->'a list->'b list->'c option)->'at->'bt->'ct
join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:
compute the list l1 of elements of a that map to k
compute the list l2 of elements of b that map to k
call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
since
2.3
val group_join_by : ?eq:('a->'a-> bool)->?hash:('a-> int)->('b->'a)->'at->'bt->('a * 'b list)t
group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x = hash y must hold.
since
2.3
val sublists_of_len : ?last:('a list->'a list option)->?offset:int->len:int->'a list->'a list list
sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].
the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.
parameter last
if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.
since
3.2
val intersperse : x:'a->'a list->'a list
intersperse ~x l inserts the element x between adjacent elements of the list l.
since
2.1, but only
since
2.2 with labels
val interleave : 'a list->'a list->'a list
interleave [x1…xn] [y1…ym] is [x1,y1,x2,y2,…] and finishes with the suffix of the longest list.
mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:
# let square_even xs =
+[[1;3;4;5;6];[2;3;4;5;6]];;
invariant: cartesian_product l = map_product id l.
since 1.2, but only
since 2.2 with labels
val map_product_l : f:('a->'b list)->'a list->'b list list
map_product_l ~f l maps each element of l to a list of objects of type 'b using f. We obtain [l1; l2; …; ln] where length l=n and li : 'b list. Then, it returns all the ways of picking exactly one element per li.
diagonal l returns all pairs of distinct positions of the list l, that is the list of List.nth i l, List.nth j l if i < j.
val partition_map_either : f:('a->('b, 'c)CCEither.t)->'a list->'b list * 'c list
partition_map_either ~f l maps f on l and gather results in lists:
if f x = Left y, adds y to the first list.
if f x = Right z, adds z to the second list.
since 3.3
val partition_filter_map : f:('a->[< `Left of 'b| `Right of 'c| `Drop ])->
+'a list->'b list * 'c list
partition_filter_map ~f l maps f on l and gather results in lists:
if f x = `Left y, adds y to the first list.
if f x = `Right z, adds z to the second list.
if f x = `Drop, ignores x.
since 0.11
val partition_map : f:('a->[< `Left of 'b| `Right of 'c| `Drop ])->
+'a list->'b list * 'c list
deprecated
use partition_filter_map instead
val group_by : ?hash:('a-> int)->?eq:('a->'a-> bool)->'at->'a listt
group_by ?hash ?eq l groups equal elements, regardless of their order of appearance. precondition: for any x and y, if eq x y then hash x = hash y must hold.
since 2.3
val join : join_row:('a->'b->'c option)->'at->'bt->'ct
join ~join_row a b combines every element of a with every element of b using join_row. If join_row returns None, then the two elements do not combine. Assume that b allows for multiple iterations.
since 2.3
val join_by : ?eq:('key->'key-> bool)->?hash:('key-> int)->
+('a->'key)->('b->'key)->merge:('key->'a->'b->'c option)->'at->'bt->'ct
join_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and combine values (x,y) from (a,b) with the same key using merge. If merge returns None, the combination of values is discarded. precondition: for any x and y, if eq x y then hash x = hash y must hold.
join_all_by ?eq ?hash key1 key2 ~merge la lb is a binary operation that takes two sequences a and b, projects their elements resp. with key1 and key2, and, for each key k occurring in at least one of them:
compute the list l1 of elements of a that map to k
compute the list l2 of elements of b that map to k
call merge k l1 l2. If merge returns None, the combination of values is discarded, otherwise it returns Some c and c is inserted in the result.
since 2.3
val group_join_by : ?eq:('a->'a-> bool)->?hash:('a-> int)->
+('b->'a)->'at->'bt->('a * 'b list)t
group_join_by ?eq ?hash key la lb associates to every element x of the first sequence, all the elements y of the second sequence such that eq x (key y). Elements of the first sequences without corresponding values in the second one are mapped to [] precondition: for any x and y, if eq x y then hash x = hash y must hold.
since 2.3
val sublists_of_len : ?last:('a list->'a list option)->?offset:int ->len:int ->
+'a list->'a list list
sublists_of_len ?last ?offset n l returns sub-lists of l that have length n. By default, these sub-lists are non overlapping: sublists_of_len 2 [1;2;3;4;5;6] returns [1;2]; [3;4]; [5;6].
the number of elements skipped between two consecutive sub-lists. By default it is n. If offset < n, the sub-lists will overlap; if offset > n, some elements will not appear at all.
parameterlast
if provided and the last group of elements g is such that length g < n, last g is called. If last g = Some g', g' is appended; otherwise g is dropped. If last = CCOption.return, it will simply keep the last group. By default, last = fun _ -> None, i.e. the last group is dropped if shorter than n.
raisesInvalid_argument
if offset <= 0 or n <= 0. See CCList.sublists_of_len for more details.
since 1.0, but only
since 1.5 with labels
val chunks : int ->'a list->'a list list
chunks n l returns consecutives chunks of size at most n from l. Each item of l will occur in exactly one chunk. Only the last chunk might be of length smaller than n. Invariant: (chunks n l |> List.flatten) = l.
since 3.2
val intersperse : x:'a->'a list->'a list
intersperse ~x l inserts the element x between adjacent elements of the list l.
since 2.1, but only
since 2.2 with labels
val interleave : 'a list->'a list->'a list
interleave [x1…xn] [y1…ym] is [x1,y1,x2,y2,…] and finishes with the suffix of the longest list.
mguard c is pure () if c is true, [] otherwise. This is useful to define a list by comprehension, e.g.:
# let square_even xs =
let* x = xs in
let* () = mguard (x mod 2 = 0) in
return @@ x * x;;
val square_even : int list -> int list = <fun>
# square_even [1;2;4;3;5;2];;
-- : int list = [4; 16; 4]
all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.
since
1.3, but only
since
2.2 with labels
val all_ok : ('a, 'err) Stdlib.resultt->('at, 'err) Stdlib.result
all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).
since
1.3, but only
since
2.2 with labels
val sorted_mem : cmp:('a->'a-> int)->'a->'a list-> bool
sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.
since
3.5
val sorted_merge : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.
val sorted_diff : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.
since
3.5
val sort_uniq : cmp:('a->'a-> int)->'a list->'a list
sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.
val sorted_merge_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.
since
0.10
val sorted_diff_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.
since
3.5
val is_sorted : cmp:('a->'a-> int)->'a list-> bool
is_sorted ~cmp l returns true iff l is sorted (according to given order).
parameter cmp
the comparison function.
since
0.17
val sorted_insert : cmp:('a->'a-> int)->?uniq:bool->'a->'a list->'a list
sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.
parameter uniq
if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).
since
0.17
val sorted_remove : cmp:('a->'a-> int)->?all:bool->'a->'a list->'a list
sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.
parameter all
if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).
since
3.5
val uniq_succ : eq:('a->'a-> bool)->'a list->'a list
uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ [1;2;1] = [1;2;1]. uniq_succ [1;1;2] = [1;2].
since
0.10
val group_succ : eq:('a->'a-> bool)->'a list->'a list list
group_succ ~eq l groups together consecutive elements that are equal according to eq.
mapi ~f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
iteri ~f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
val iteri2 : f:(int ->'a->'b-> unit)->'at->'bt-> unit
iteri2 ~f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.
raises Invalid_argument
when lists do not have the same length.
since
2.0, but only
since
2.2 with labels
val foldi : f:('b-> int ->'a->'b)->init:'b->'at->'b
foldi ~f ~init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.
val foldi2 : f:('c-> int ->'a->'b->'c)->init:'c->'at->'bt->'c
foldi2 ~f ~init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(… (f init i_0 l1_0 l2_0) …) i_n l1_n l2_n .
get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.
set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.
insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.
remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.
Set Operators
Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).
uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.
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.
assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.
since
1.5, but only
since
2.0 with labels
val mem_assoc : ?eq:('a->'a-> bool)->'a->('a * _)t-> bool
mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.
since
2.0
val remove_assoc : eq:('a->'a-> bool)->'a->('a * 'b)t->('a * 'b)t
remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.
of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
all_some l returns Some l' if all elements of l are of the form Some x, or None otherwise.
since 1.3, but only
since 2.2 with labels
val all_ok : ('a, 'err)Stdlib.resultt->('at, 'err)Stdlib.result
all_ok l returns Ok l' if all elements of l are of the form Ok x, or Error e otherwise (with the first error met).
since 1.3, but only
since 2.2 with labels
val sorted_mem : cmp:('a->'a-> int)->'a->'a list-> bool
sorted_mem ~cmp x l and mem x l give the same result for any sorted list l, but potentially more efficiently.
since 3.5
val sorted_merge : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge ~cmp l1 l2 merges elements from both sorted list using the given comparison function cmp.
val sorted_diff : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff ~cmp l1 l2 returns the elements in l1 that are not in l2. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff ~cmp [1;1;1;2;2;3] [1;2;2] would be [1;1;3]. It is the left inverse of sorted_merge; that is, sorted_diff ~cmp (sorted_merge ~cmp l1 l2) l2 is always equal to l1 for sorted lists l1 and l2.
since 3.5
val sort_uniq : cmp:('a->'a-> int)->'a list->'a list
sort_uniq ~cmp l sorts the list l using the given comparison function cmp and remove duplicate elements.
val sorted_merge_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_merge_uniq ~cmp l1 l2 merges the sorted lists l1 and l2 and removes duplicates.
since 0.10
val sorted_diff_uniq : cmp:('a->'a-> int)->'a list->'a list->'a list
sorted_diff_uniq ~cmp l1 l2 collects the elements in l1 that are not in l2 and then remove duplicates. Both lists are assumed to be sorted with respect to cmp and duplicate elements in the input lists are treated individually; for example, sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2] would be [1]. sorted_diff_uniq ~cmp l1 l2 and uniq_succ ~eq (sorted_diff ~cmp l1 l2) always give the same result for sorted l1 and l2 and compatible cmp and eq.
since 3.5
val is_sorted : cmp:('a->'a-> int)->'a list-> bool
is_sorted ~cmp l returns true iff l is sorted (according to given order).
parametercmp
the comparison function.
since 0.17
val sorted_insert : cmp:('a->'a-> int)->?uniq:bool ->'a->'a list->'a list
sorted_insert ~cmp ?uniq x l inserts x into l such that, if l was sorted, then sorted_insert x l is sorted too.
parameteruniq
if true and x is already in sorted position in l, then x is not duplicated. Default false (x will be inserted in any case).
since 0.17
val sorted_remove : cmp:('a->'a-> int)->?all:bool ->'a->'a list->'a list
sorted_remove ~cmp x l removes x from a sorted list l such that the return value is sorted too. By default, it is the left inverse of sorted_insert; that is, sorted_remove ~cmp x (sorted_insert ~cmp x l) is equal to l for any sorted list l.
parameterall
if true then all occurrences of x will be removed. Otherwise, only the first x will be removed (if any). Default false (only the first will be removed).
since 3.5
val uniq_succ : eq:('a->'a-> bool)->'a list->'a list
uniq_succ ~eq l removes duplicate elements that occur one next to the other. Examples: uniq_succ [1;2;1] = [1;2;1]. uniq_succ [1;1;2] = [1;2].
since 0.10
val group_succ : eq:('a->'a-> bool)->'a list->'a list list
group_succ ~eq l groups together consecutive elements that are equal according to eq.
mapi ~f l is like map, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
iteri ~f l is like iter, but the function f is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.
val iteri2 : f:(int ->'a->'b-> unit)->'at->'bt-> unit
iteri2 ~f l1 l2 applies f to the two lists l1 and l2 simultaneously. The integer passed to f indicates the index of element.
raisesInvalid_argument
when lists do not have the same length.
since 2.0, but only
since 2.2 with labels
val foldi : f:('b->int ->'a->'b)->init:'b->'at->'b
foldi ~f ~init l is like fold but it also passes in the index of each element, from 0 to length l - 1 as additional argument to the folded function f. Tail-recursive.
val foldi2 : f:('c->int ->'a->'b->'c)->init:'c->'at->'bt->'c
foldi2 ~f ~init l1 l2 folds on the two lists l1 and l2, with index of each element passed to the function f. Computes f(… (f init i_0 l1_0 l2_0) …) i_n l1_n l2_n .
get_at_idx i l returns Some i-th element of the given list l or None if the list l is too short. If the index is negative, it will get element starting from the end of the list l.
set_at_idx i x l replaces the i-th element with x (removes the old one), or does nothing if index is too high. If the index is negative, it will set element starting from the end of the list.
insert_at_idx i x l inserts x at i-th position, between the two existing elements. If the index is too high, append at the end of the list. If the index is negative, it will insert element starting from the end of the list.
remove_at_idx i l removes element at given index i. Does nothing if the index is too high. If the index is negative, it will remove element starting from the end of the list.
Set Operators
Those operations maintain the invariant that the list does not contain duplicates (if it already satisfies it).
uniq ~eq l removes duplicates in l w.r.t the equality predicate eq. Complexity is quadratic in the length of the list, but the order of elements is preserved. If you wish for a faster de-duplication but do not care about the order, use sort_uniq.
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.
assq_opt k alist returns Some v if the given key k is present into alist. Like Assoc.assoc_opt but use physical equality instead of structural equality to compare keys. Safe version of assq.
since 1.5, but only
since 2.0 with labels
val mem_assoc : ?eq:('a->'a-> bool)->'a->('a * _)t-> bool
mem_assoc ?eq k alist returns true iff k is a key in alist. Like Assoc.mem.
since 2.0
val remove_assoc : eq:('a->'a-> bool)->'a->('a * 'b)t->('a * 'b)t
remove_assoc ~eq k alist returns the alist without the first pair with key k, if any. Like Assoc.remove.
of_seq seq builds a list from a given Seq.t. In the result, elements appear in the same order as they did in the source Seq.t. Renamed from of_std_seq since 3.0.
pp ?pp_start ?pp_stop ?pp_sep ppf l prints the contents of a list.
\ No newline at end of file
diff --git a/dev/containers/CCListLabels/module-type-MONAD/index.html b/dev/containers/CCListLabels/module-type-MONAD/index.html
index 9ed17031..6ad48f22 100644
--- a/dev/containers/CCListLabels/module-type-MONAD/index.html
+++ b/dev/containers/CCListLabels/module-type-MONAD/index.html
@@ -1,2 +1,2 @@
-MONAD (containers.CCListLabels.MONAD)
\ No newline at end of file
diff --git a/dev/containers/CCMap/Make/index.html b/dev/containers/CCMap/Make/index.html
new file mode 100644
index 00000000..3f919fc9
--- /dev/null
+++ b/dev/containers/CCMap/Make/index.html
@@ -0,0 +1,4 @@
+
+Make (containers.CCMap.Make)
Module CCMap.Make
Parameters
moduleO : Stdlib.Map.OrderedType
Signature
includeStdlib.Map.S withtype'a t = 'aStdlib.Map.Make(O).twithtypekey = O.t
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
since 0.16
val update : key->('a option->'a option)->'at->'at
update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is Nonek is removed from m, and if the result is Some v' then add k v' m is returned.
find_first f m where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists. See Map.S.find_first.
since 1.5
val find_first_opt : (key-> bool)->'at->(key * 'a) option
find_first_opt f m where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists. Safe version of find_first.
since 1.5
val merge_safe : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)
+->'at->'bt->'ct
merge_safe ~f a b merges the maps a and b together.
add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a)Stdlib.Seq.t->'at
add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:(key->'a->'a->'a)->(key * 'a)Stdlib.Seq.t->'at
of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
add_iter m iter adds the given iter of bindings to the map m. Like add_list.
since 2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter->'at
add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_iter iter builds a map from the given iter of bindings. Like of_list.
since 2.8
val of_iter_with : f:(key->'a->'a->'a)->(key * 'a)iter->'at
of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.
of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.
add_list m l adds the given list l of bindings to the map m.
since 0.14
val add_list_with : f:(key->'a->'a->'a)->'at->(key * 'a) list->'at
add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.
\ No newline at end of file
diff --git a/dev/containers/CCMap/index.html b/dev/containers/CCMap/index.html
index ff129d46..8e4b0fa6 100644
--- a/dev/containers/CCMap/index.html
+++ b/dev/containers/CCMap/index.html
@@ -1,2 +1,2 @@
-CCMap (containers.CCMap)
Module CCMap
Extensions of Standard Map
Provide useful functions and iterators on Map.S
since
0.5
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a printer = Stdlib.Format.formatter ->'a-> unit
moduleMake (O : Stdlib.Map.OrderedType) : Swithtype'a t = 'aStdlib.Map.Make(O).tandtypekey = O.t
\ No newline at end of file
diff --git a/dev/containers/CCMap/module-type-S/index.html b/dev/containers/CCMap/module-type-S/index.html
index fe881d76..d0692a79 100644
--- a/dev/containers/CCMap/module-type-S/index.html
+++ b/dev/containers/CCMap/module-type-S/index.html
@@ -1,2 +1,4 @@
-S (containers.CCMap.S)
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
since
0.16
val update : key->('a option->'a option)->'at->'at
update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is Nonek is removed from m, and if the result is Some v' then add k v' m is returned.
find_first f m where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists. See Map.S.find_first.
since
1.5
val find_first_opt : (key-> bool)->'at->(key * 'a) option
find_first_opt f m where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists. Safe version of find_first.
since
1.5
val merge_safe : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)->'at->'bt->'ct
merge_safe ~f a b merges the maps a and b together.
add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a) Stdlib.Seq.t->'at
add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.
since
3.0
val of_seq_with : f:(key->'a->'a->'a)->(key * 'a) Stdlib.Seq.t->'at
of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
add_iter m iter adds the given iter of bindings to the map m. Like add_list.
since
2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter->'at
add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_iter iter builds a map from the given iter of bindings. Like of_list.
since
2.8
val of_iter_with : f:(key->'a->'a->'a)->(key * 'a)iter->'at
of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.
of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.
add_list m l adds the given list l of bindings to the map m.
since
0.14
val add_list_with : f:(key->'a->'a->'a)->'at->(key * 'a) list->'at
add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
since 0.16
val update : key->('a option->'a option)->'at->'at
update k f m calls f (Some v) if find k m = v, otherwise it calls f None. In any case, if the result is Nonek is removed from m, and if the result is Some v' then add k v' m is returned.
find_first f m where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists. See Map.S.find_first.
since 1.5
val find_first_opt : (key-> bool)->'at->(key * 'a) option
find_first_opt f m where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists. Safe version of find_first.
since 1.5
val merge_safe : f:(key->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'c option)
+->'at->'bt->'ct
merge_safe ~f a b merges the maps a and b together.
add_seq m seq adds the given Seq.t of bindings to the map m. Like add_list. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a)Stdlib.Seq.t->'at
add_seq ~f m l adds the given seq l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_seq seq builds a map from the given Seq.t of bindings. Like of_list. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:(key->'a->'a->'a)->(key * 'a)Stdlib.Seq.t->'at
of_seq_with ~f l builds a map from the given seq l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
add_iter m iter adds the given iter of bindings to the map m. Like add_list.
since 2.8
val add_iter_with : f:(key->'a->'a->'a)->'at->(key * 'a)iter->'at
add_iter ~f m l adds the given iter l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
of_iter iter builds a map from the given iter of bindings. Like of_list.
since 2.8
val of_iter_with : f:(key->'a->'a->'a)->(key * 'a)iter->'at
of_iter_with ~f l builds a map from the given iter l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the iter than v2.
of_list l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, only its last binding will be present in the result.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list_with ~f l builds a map from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the list than v2.
add_list m l adds the given list l of bindings to the map m.
since 0.14
val add_list_with : f:(key->'a->'a->'a)->'at->(key * 'a) list->'at
add_list ~f m l adds the given list l of bindings to the map m, using f to combine values that have the same key. If a key occurs several times, all its bindings are combined using the function f, with f key v1 v2 being called with v1 occurring later in the seq than v2.
pp ?pp_start ?pp_stop ?pp_arrow ?pp_sep pp_key pp_v m pretty-prints the contents of the map.
\ No newline at end of file
diff --git a/dev/containers/CCMonomorphic/index.html b/dev/containers/CCMonomorphic/index.html
index 81e8c52f..022bc601 100644
--- a/dev/containers/CCMonomorphic/index.html
+++ b/dev/containers/CCMonomorphic/index.html
@@ -1,2 +1,2 @@
-CCMonomorphic (containers.CCMonomorphic)
Module CCMonomorphic
Shadow unsafe functions and operators from Stdlib
val (=) : int -> int -> bool
val (<>) : int -> int -> bool
val (<) : int -> int -> bool
val (>) : int -> int -> bool
val (<=) : int -> int -> bool
val (>=) : int -> int -> bool
val compare : int -> int -> int
val min : int -> int -> int
val max : int -> int -> int
Infix operators for Floats
val (=.) : float -> float -> bool
since
2.1
val (<>.) : float -> float -> bool
since
2.1
val (<.) : float -> float -> bool
since
2.1
val (>.) : float -> float -> bool
since
2.1
val (<=.) : float -> float -> bool
since
2.1
val (>=.) : float -> float -> bool
since
2.1
Shadow Dangerous Operators
val (==) : [ `Consider_using_CCEqual_physical ]
val (!=) : [ `Consider_using_CCEqual_physical ]
since
2.1
\ No newline at end of file
+CCMonomorphic (containers.CCMonomorphic)
Module CCMonomorphic
Shadow unsafe functions and operators from Stdlib
since 2.0
val (=) : int ->int -> bool
val (<>) : int ->int -> bool
val (<) : int ->int -> bool
val (>) : int ->int -> bool
val (<=) : int ->int -> bool
val (>=) : int ->int -> bool
val compare : int ->int -> int
val min : int ->int -> int
val max : int ->int -> int
Infix operators for Floats
val (=.) : float ->float -> bool
since 2.1
val (<>.) : float ->float -> bool
since 2.1
val (<.) : float ->float -> bool
since 2.1
val (>.) : float ->float -> bool
since 2.1
val (<=.) : float ->float -> bool
since 2.1
val (>=.) : float ->float -> bool
since 2.1
Shadow Dangerous Operators
val (==) : [ `Consider_using_CCEqual_physical ]
val (!=) : [ `Consider_using_CCEqual_physical ]
since 2.1
\ No newline at end of file
diff --git a/dev/containers/CCMonomorphicShims_/index.html b/dev/containers/CCMonomorphicShims_/index.html
index de672483..cd5f1da9 100644
--- a/dev/containers/CCMonomorphicShims_/index.html
+++ b/dev/containers/CCMonomorphicShims_/index.html
@@ -1,2 +1,2 @@
-CCMonomorphicShims_ (containers.CCMonomorphicShims_)
Module CCMonomorphicShims_
module Stdlib = Stdlib
\ No newline at end of file
+CCMonomorphicShims_ (containers.CCMonomorphicShims_)
Module CCMonomorphicShims_
moduleStdlib = Stdlib
\ No newline at end of file
diff --git a/dev/containers/CCNativeint/Infix/index.html b/dev/containers/CCNativeint/Infix/index.html
index 6f34f9c0..964a89c6 100644
--- a/dev/containers/CCNativeint/Infix/index.html
+++ b/dev/containers/CCNativeint/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCNativeint.Infix)
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.
\ No newline at end of file
diff --git a/dev/containers/CCNativeint/index.html b/dev/containers/CCNativeint/index.html
index 3da74046..f479b308 100644
--- a/dev/containers/CCNativeint/index.html
+++ b/dev/containers/CCNativeint/index.html
@@ -1,2 +1,2 @@
-CCNativeint (containers.CCNativeint)
Module CCNativeint
Nativeint
Helpers for processor-native integers
This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 232 or 264 depending on the word size of the architecture.
Performance notice: values of type nativeint occupy more memory space than values of type int, and arithmetic operations on nativeint are generally slower than those on int. Use nativeint only when the application requires the extra bit of precision over the int type.
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.
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.
of_string_exn s converts the given string s into a native integer. Alias to Nativeint.of_string. Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCNativeint.max_int+1]. If the input exceeds CCNativeint.max_int it is converted to the signed integer CCInt64.min_int + input - CCNativeint.max_int - 1.
Raise Failure "Nativeint.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.
\ No newline at end of file
+CCNativeint (containers.CCNativeint)
Module CCNativeint
Nativeint
Helpers for processor-native integers
This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 232 or 264 depending on the word size of the architecture.
Performance notice: values of type nativeint occupy more memory space than values of type int, and arithmetic operations on nativeint are generally slower than those on int. Use nativeint only when the application requires the extra bit of precision over the int type.
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.
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.
of_string_exn s converts the given string s into a native integer. Alias to Nativeint.of_string. Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.
The 0u prefix reads the input as an unsigned integer in the range [0, 2*CCNativeint.max_int+1]. If the input exceeds CCNativeint.max_int it is converted to the signed integer CCInt64.min_int + input - CCNativeint.max_int - 1.
Raise Failure "Nativeint.of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.
x / y is the integer quotient of x and y. Integer division. Raise Division_by_zero if the second argument y is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).
x mod y is the integer remainder of x / y. If y <> zero, the result of x mod y satisfies the following properties: zero <= x mod y < abs y and x = ((x / y) * y) + (x mod y). If y = 0, x mod y raises Division_by_zero.
x lsl y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.
x lsr y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.
x asr y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.
\ No newline at end of file
diff --git a/dev/containers/CCOpt/Infix/index.html b/dev/containers/CCOpt/Infix/index.html
new file mode 100644
index 00000000..f254fdab
--- /dev/null
+++ b/dev/containers/CCOpt/Infix/index.html
@@ -0,0 +1,2 @@
+
+Infix (containers.CCOpt.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCOpt/index.html b/dev/containers/CCOpt/index.html
index 58bb2164..48940ae4 100644
--- a/dev/containers/CCOpt/index.html
+++ b/dev/containers/CCOpt/index.html
@@ -1,2 +1,2 @@
-CCOpt (containers.CCOpt)
sequence_l [x1; x2; …; xn] returns Some [y1; y2; …; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.
val wrap : ?handler:(exn -> bool)->('a->'b)->'a->'b option
wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.
parameter handler
the exception handler, which returns true if the exception is to be caught.
val wrap2 : ?handler:(exn -> bool)->('a->'b->'c)->'a->'b->'c option
wrap2 ?handler f x y is similar to wrap but for binary functions.
to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
sequence_l [x1; x2; …; xn] returns Some [y1; y2; …; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.
val wrap : ?handler:(exn -> bool)->('a->'b)->'a->'b option
wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.
parameterhandler
the exception handler, which returns true if the exception is to be caught.
val wrap2 : ?handler:(exn -> bool)->('a->'b->'c)->'a->'b->'c option
wrap2 ?handler f x y is similar to wrap but for binary functions.
to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 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 a430e287..ae4980c9 100644
--- a/dev/containers/CCOption/Infix/index.html
+++ b/dev/containers/CCOption/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCOption.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCOption/index.html b/dev/containers/CCOption/index.html
index c152c406..b2e05402 100644
--- a/dev/containers/CCOption/index.html
+++ b/dev/containers/CCOption/index.html
@@ -1,2 +1,2 @@
-CCOption (containers.CCOption)
sequence_l [x1; x2; …; xn] returns Some [y1; y2; …; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.
val wrap : ?handler:(exn -> bool)->('a->'b)->'a->'b option
wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.
parameter handler
the exception handler, which returns true if the exception is to be caught.
val wrap2 : ?handler:(exn -> bool)->('a->'b->'c)->'a->'b->'c option
wrap2 ?handler f x y is similar to wrap but for binary functions.
to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
sequence_l [x1; x2; …; xn] returns Some [y1; y2; …; yn] if every xi is Some yi. Otherwise, if the list contains at least one None, the result is None.
val wrap : ?handler:(exn -> bool)->('a->'b)->'a->'b option
wrap ?handler f x calls f x and returns Some y if f x = y. If f x raises any exception, the result is None. This can be useful to wrap functions such as Map.S.find.
parameterhandler
the exception handler, which returns true if the exception is to be caught.
val wrap2 : ?handler:(exn -> bool)->('a->'b->'c)->'a->'b->'c option
wrap2 ?handler f x y is similar to wrap but for binary functions.
to_seq o is o as a sequence Seq.t. Some x is the singleton sequence containing x and None is the empty sequence. Same as Stdlib.Option.to_seq Renamed from to_std_seq since 3.0.
\ No newline at end of file
diff --git a/dev/containers/CCOrd/Infix/index.html b/dev/containers/CCOrd/Infix/index.html
index 72bea9be..e12c1d2c 100644
--- a/dev/containers/CCOrd/Infix/index.html
+++ b/dev/containers/CCOrd/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCOrd.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCOrd/index.html b/dev/containers/CCOrd/index.html
index 4fae37e7..af4f0c40 100644
--- a/dev/containers/CCOrd/index.html
+++ b/dev/containers/CCOrd/index.html
@@ -1,6 +1,6 @@
-CCOrd (containers.CCOrd)
Module CCOrd
Comparisons
type'a t = 'a->'a-> int
Comparison (total ordering) between two elements, that returns an int.
since NEXT_RELEASE in favor of poly. The reason is that compare is easily shadowed, can shadow other comparators, and is just generally not very descriptive.
map f ord is the comparison function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with ord. Example: map fst CCInt.compare compares values of type (int * 'a) by their first component.
map f ord is the comparison function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with ord. Example: map fst CCInt.compare compares values of type (int * 'a) by their first component.
\ No newline at end of file
diff --git a/dev/containers/CCPair/index.html b/dev/containers/CCPair/index.html
index 4f458b39..06197420 100644
--- a/dev/containers/CCPair/index.html
+++ b/dev/containers/CCPair/index.html
@@ -1,2 +1,2 @@
-CCPair (containers.CCPair)
Print a pair given an optional separator, an optional start and stop and a method for printing each of its elements.
\ No newline at end of file
diff --git a/dev/containers/CCParse/Debug_/index.html b/dev/containers/CCParse/Debug_/index.html
index e666e862..de4c20a5 100644
--- a/dev/containers/CCParse/Debug_/index.html
+++ b/dev/containers/CCParse/Debug_/index.html
@@ -1,2 +1,2 @@
-Debug_ (containers.CCParse.Debug_)
trace_fail name p behaves like p, but prints the error message of p on stderr whenever p fails.
parametername
used as a prefix of all trace messages.
val trace_success : string ->print:('a-> string)->'at->'at
trace_success name ~print p behaves like p, but prints successful runs of p using print.
val trace_success_or_fail : string ->print:('a-> string)->'at->'at
Trace both error or success
\ No newline at end of file
diff --git a/dev/containers/CCParse/Error/index.html b/dev/containers/CCParse/Error/index.html
index 0650e8de..6bdcd880 100644
--- a/dev/containers/CCParse/Error/index.html
+++ b/dev/containers/CCParse/Error/index.html
@@ -1,2 +1,2 @@
-Error (containers.CCParse.Error)
\ No newline at end of file
diff --git a/dev/containers/CCParse/Infix/index.html b/dev/containers/CCParse/Infix/index.html
index bc0b7f97..87f0ee32 100644
--- a/dev/containers/CCParse/Infix/index.html
+++ b/dev/containers/CCParse/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCParse.Infix)
a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a. See try_ to ensure a does not consume anything (but it is best to avoid wrapping large parsers with try_).
a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".
a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a. See try_ to ensure a does not consume anything (but it is best to avoid wrapping large parsers with try_).
a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".
\ No newline at end of file
diff --git a/dev/containers/CCParse/Position/index.html b/dev/containers/CCParse/Position/index.html
index a4f1f0b1..99e1c68d 100644
--- a/dev/containers/CCParse/Position/index.html
+++ b/dev/containers/CCParse/Position/index.html
@@ -1,2 +1,2 @@
-Position (containers.CCParse.Position)
Unspecified pretty-printed version of the position.
\ No newline at end of file
diff --git a/dev/containers/CCParse/Slice/index.html b/dev/containers/CCParse/Slice/index.html
index 65aa7b93..e2354cd6 100644
--- a/dev/containers/CCParse/Slice/index.html
+++ b/dev/containers/CCParse/Slice/index.html
@@ -1,2 +1,2 @@
-Slice (containers.CCParse.Slice)
Convert the slice into a string. Linear time and memory in length slice
\ No newline at end of file
diff --git a/dev/containers/CCParse/U/index.html b/dev/containers/CCParse/U/index.html
index fbd5a51b..2300b839 100644
--- a/dev/containers/CCParse/U/index.html
+++ b/dev/containers/CCParse/U/index.html
@@ -1,2 +1,3 @@
-U (containers.CCParse.U)
Module CCParse.U
Utils
This is useful to parse OCaml-like values in a simple way. All the parsers are whitespace-insensitive (they skip whitespace).
val list : ?start:string->?stop:string->?sep:string->'at->'a listt
list p parses a list of p, with the OCaml conventions for start token "[", stop token "]" and separator ";". Whitespace between items are skipped.
Parse a triple using OCaml syntactic conventions. The default is "(a, b, c)".
\ No newline at end of file
diff --git a/dev/containers/CCParse/index.html b/dev/containers/CCParse/index.html
index e36eb59c..7eef1fce 100644
--- a/dev/containers/CCParse/index.html
+++ b/dev/containers/CCParse/index.html
@@ -1,5 +1,5 @@
-CCParse (containers.CCParse)
Module CCParse
Very Simple Parser Combinators
These combinators can be used to write very simple parsers, for example to extract data from a line-oriented file, or as a replacement to Scanf.
A few examples
Some more advanced example(s) can be found in the /examples directory.
Parse a tree
open CCParse;;
+CCParse (containers.CCParse)
Module CCParse
Very Simple Parser Combinators
These combinators can be used to write very simple parsers, for example to extract data from a line-oriented file, or as a replacement to Scanf.
A few examples
Some more advanced example(s) can be found in the /examples directory.
Parse a tree
open CCParse;;
type tree = L of int | N of tree * tree;;
@@ -14,9 +14,9 @@ let ptree = fix @@ fun self ->
;;
parse_string_exn ptree "(1 (2 3))" ;;
-parse_string_exn ptree "((1 2) (3 (4 5)))" ;;
Parse a list of words
open Containers.Parse;;
+parse_string_exn ptree "((1 2) (3 (4 5)))" ;;
Parse a list of words
open Containers.Parse;;
let p = U.list ~sep:"," U.word;;
-parse_string_exn p "[abc , de, hello ,world ]";;
Stress Test
This makes a list of 100_000 integers, prints it and parses it back.
let p = CCParse.(U.list ~sep:"," U.int);;
+parse_string_exn p "[abc , de, hello ,world ]";;
Stress Test
This makes a list of 100_000 integers, prints it and parses it back.
let p = CCParse.(U.list ~sep:"," U.int);;
let l = CCList.(1 -- 100_000);;
let l_printed =
@@ -24,4 +24,6 @@ let l_printed =
let l' = CCParse.parse_string_exn p l_printed;;
-assert (l=l');;
Stability guarantees
Some functions are marked "experimental" and are still subject to change.
type position
A position in the input. Typically it'll point at the beginning of an error location.
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.
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.
set_current_slice slice replaces the parser's state with slice.
EXPERIMENTAL
since
NEXT_RELEASE
val chars_fold : f:('acc-> char ->[ `Continue of 'acc| `Consume_and_stop of 'acc| `Stop of 'acc| `Fail of string ])->'acc->('acc * slice)t
chars_fold f acc0 folds over characters of the input. Each char c is passed, along with the current accumulator, to f; f can either:
stop, by returning `Stop acc. In this case the final accumulator acc is returned, and c is not consumed.
consume char and stop, by returning `Consume_and_stop acc.
fail, by returning `Fail msg. In this case the parser fails with the given message.
continue, by returning `Continue acc. The parser continues to the next char with the new accumulator.
This is a generalization of of chars_if that allows one to transform characters on the fly, skip some, handle escape sequences, etc. It can also be useful as a base component for a lexer.
returns
a pair of the final accumular, and the slice matched by the fold.
since
NEXT_RELEASE
val chars_fold_transduce : f:('acc-> char ->[ `Continue of 'acc| `Yield of 'acc * char| `Consume_and_stop| `Stop| `Fail of string ])->'acc->('acc * string)t
Same as char_fold but with the following differences:
returns a string along with the accumulator, rather than the slice of all the characters accepted by `Continue _. The string is built from characters returned by `Yield.
new case `Yield (acc, c) adds c to the returned string and continues parsing with acc.
chars_if f parses a string of chars that satisfy f. Cannot fail.
val chars1_if : ?descr:string->(char -> bool)->string t
Like chars_if, but accepts only non-empty strings. chars1_if p fails if the string accepted by chars_if p is empty. chars1_if p is equivalent to take1_if p >|= Slice.to_string.
parameter descr
describes what kind of character was expected, in case of error
optional p tries to parse p, and return () whether it succeeded or failed. Cannot fail itself. It consumes input if p succeeded (as much as p consumed), but consumes not input if p failed.
try_opt p tries to parse using p, and return Some x if p succeeded with x (and consumes what p consumed). Otherwise it returns None and consumes nothing. This cannot fail.
many_until ~until p parses as many p as it can until the until parser successfully returns. If p fails before that then many_until ~until p fails as well. Typically until can be a closing ')' or another termination condition, and what is consumed by until is also consumed by many_until ~until p.
try_or p1 ~f ~else_:p2 attempts to parse x using p1, and then becomes f x. If p1 fails, then it becomes p2. This can be useful if f is expensive but only ever works if p1 matches (e.g. after an opening parenthesis or some sort of prefix).
since
NEXT_RELEASE
val try_or_l : ?msg:string->?else_:'at->(unit t * 'at) list->'at
try_or_l ?else_ l tries each pair (test, p) in order. If the n-th test succeeds, then try_or_l l behaves like n-th p, whether p fails or not. If they all fail, and else_ is defined, then it behaves like else_. If all fail, and else_ is None, then it fails as well.
This is a performance optimization compared to (<|>). We commit to a branch if the test succeeds, without backtracking at all.
See lookahead_ignore for a convenient way of writing the test conditions.
skip p parses zero or more times p and ignores its result. It is eager, meaning it will continue as long as p succeeds. As soon as p fails, skip p stops consuming any input.
lookahead_ignore p tries to parse input with p, and succeeds if p succeeds. However it doesn't consume any input and returns (), so in effect its only use-case is to detect whether p succeeds, e.g. in try_or_l.
line_str is line >|= Slice.to_string. It parses the next line and turns the slice into a string. The state points to the character immediately after the '\n' character.
each_line p runs p on each line of the input. EXPERIMENTAL
since
NEXT_RELEASE
val split_1 : on_char:char->(slice * slice option)t
split_1 ~on_char looks for on_char in the input, and returns a pair sl1, sl2, where:
sl1 is the slice of the input the precedes the first occurrence of on_char, or the whole input if on_char cannot be found. It does not contain on_char.
sl2 is the slice that comes after on_char, or None if on_char couldn't be found. It doesn't contain the first occurrence of on_char (if any).
The parser is now positioned at the end of the input.
split_list ~on_char splits the input on all occurrences of on_char, returning a list of slices.
EXPERIMENTAL
since
NEXT_RELEASE
val split_list_at_most : on_char:char-> int ->slice listt
split_list_at_most ~on_char n applies split_1 ~on_char at most n times, to get a list of n+1 elements. The last element might contain on_char. This is useful to limit the amount of work done by split_list.
split_list_map ~on_char p uses split_list ~on_char to split the input, then parses each chunk of the input thus obtained using p.
The difference with sep ~by:(char on_char) p is that sep calls p first, and only tries to find on_char after p returns. While it is more flexible, this technique also means p has to be careful not to consume on_char by error.
A useful specialization of this is each_line, which is basically each_split ~on_char:'\n' p.
Memoize the parser. memo p will behave like p, but when called in a state (read: position in input) it has already processed, memo p returns a result directly. The implementation uses an underlying hashtable. This can be costly in memory, but improve the run time a lot if there is a lot of backtracking involving p.
Do not call memo inside other functions, especially with (>>=), map, etc. being so prevalent. Instead the correct way to use it is in a toplevel definition:
let my_expensive_parser = memo (foo *> bar >>= fun i -> …)
a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a. See try_ to ensure a does not consume anything (but it is best to avoid wrapping large parsers with try_).
a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".
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.
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.
set_current_slice slice replaces the parser's state with slice.
EXPERIMENTAL
since 3.6
val chars_fold : f:('acc->char ->[ `Continue of 'acc| `Consume_and_stop of 'acc| `Stop of 'acc| `Fail of string ])
+->'acc->('acc * slice)t
chars_fold f acc0 folds over characters of the input. Each char c is passed, along with the current accumulator, to f; f can either:
stop, by returning `Stop acc. In this case the final accumulator acc is returned, and c is not consumed.
consume char and stop, by returning `Consume_and_stop acc.
fail, by returning `Fail msg. In this case the parser fails with the given message.
continue, by returning `Continue acc. The parser continues to the next char with the new accumulator.
This is a generalization of of chars_if that allows one to transform characters on the fly, skip some, handle escape sequences, etc. It can also be useful as a base component for a lexer.
returns
a pair of the final accumular, and the slice matched by the fold.
since 3.6
val chars_fold_transduce : f:('acc->char ->[ `Continue of 'acc| `Yield of 'acc * char| `Consume_and_stop| `Stop| `Fail of string ])
+->'acc->('acc * string)t
Same as char_fold but with the following differences:
returns a string along with the accumulator, rather than the slice of all the characters accepted by `Continue _. The string is built from characters returned by `Yield.
new case `Yield (acc, c) adds c to the returned string and continues parsing with acc.
chars_if f parses a string of chars that satisfy f. Cannot fail.
val chars1_if : ?descr:string ->(char -> bool)->string t
Like chars_if, but accepts only non-empty strings. chars1_if p fails if the string accepted by chars_if p is empty. chars1_if p is equivalent to take1_if p >|= Slice.to_string.
parameterdescr
describes what kind of character was expected, in case of error
optional p tries to parse p, and return () whether it succeeded or failed. Cannot fail itself. It consumes input if p succeeded (as much as p consumed), but consumes not input if p failed.
try_opt p tries to parse using p, and return Some x if p succeeded with x (and consumes what p consumed). Otherwise it returns None and consumes nothing. This cannot fail.
many_until ~until p parses as many p as it can until the until parser successfully returns. If p fails before that then many_until ~until p fails as well. Typically until can be a closing ')' or another termination condition, and what is consumed by until is also consumed by many_until ~until p.
try_or p1 ~f ~else_:p2 attempts to parse x using p1, and then becomes f x. If p1 fails, then it becomes p2. This can be useful if f is expensive but only ever works if p1 matches (e.g. after an opening parenthesis or some sort of prefix).
since 3.6
val try_or_l : ?msg:string ->?else_:'at->(unit t * 'at) list->'at
try_or_l ?else_ l tries each pair (test, p) in order. If the n-th test succeeds, then try_or_l l behaves like n-th p, whether p fails or not. If they all fail, and else_ is defined, then it behaves like else_. If all fail, and else_ is None, then it fails as well.
This is a performance optimization compared to (<|>). We commit to a branch if the test succeeds, without backtracking at all.
See lookahead_ignore for a convenient way of writing the test conditions.
skip p parses zero or more times p and ignores its result. It is eager, meaning it will continue as long as p succeeds. As soon as p fails, skip p stops consuming any input.
lookahead_ignore p tries to parse input with p, and succeeds if p succeeds. However it doesn't consume any input and returns (), so in effect its only use-case is to detect whether p succeeds, e.g. in try_or_l.
line_str is line >|= Slice.to_string. It parses the next line and turns the slice into a string. The state points to the character immediately after the '\n' character.
each_line p runs p on each line of the input. EXPERIMENTAL
since 3.6
val split_1 : on_char:char ->(slice * slice option)t
split_1 ~on_char looks for on_char in the input, and returns a pair sl1, sl2, where:
sl1 is the slice of the input the precedes the first occurrence of on_char, or the whole input if on_char cannot be found. It does not contain on_char.
sl2 is the slice that comes after on_char, or None if on_char couldn't be found. It doesn't contain the first occurrence of on_char (if any).
The parser is now positioned at the end of the input.
split_list ~on_char splits the input on all occurrences of on_char, returning a list of slices.
EXPERIMENTAL
since 3.6
val split_list_at_most : on_char:char ->int ->slice listt
split_list_at_most ~on_char n applies split_1 ~on_char at most n times, to get a list of n+1 elements. The last element might contain on_char. This is useful to limit the amount of work done by split_list.
split_list_map ~on_char p uses split_list ~on_char to split the input, then parses each chunk of the input thus obtained using p.
The difference with sep ~by:(char on_char) p is that sep calls p first, and only tries to find on_char after p returns. While it is more flexible, this technique also means p has to be careful not to consume on_char by error.
A useful specialization of this is each_line, which is basically each_split ~on_char:'\n' p.
Memoize the parser. memo p will behave like p, but when called in a state (read: position in input) it has already processed, memo p returns a result directly. The implementation uses an underlying hashtable. This can be costly in memory, but improve the run time a lot if there is a lot of backtracking involving p.
Do not call memo inside other functions, especially with (>>=), map, etc. being so prevalent. Instead the correct way to use it is in a toplevel definition:
let my_expensive_parser = memo (foo *> bar >>= fun i -> …)
a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a. See try_ to ensure a does not consume anything (but it is best to avoid wrapping large parsers with try_).
a <?> msg behaves like a, but if a fails, a <?> msg fails with msg instead. Useful as the last choice in a series of <|>. For example: a <|> b <|> c <?> "expected one of a, b, c".
\ No newline at end of file
diff --git a/dev/containers/CCRandom/index.html b/dev/containers/CCRandom/index.html
index 19366c71..c2874751 100644
--- a/dev/containers/CCRandom/index.html
+++ b/dev/containers/CCRandom/index.html
@@ -1,7 +1,8 @@
-CCRandom (containers.CCRandom)
replicate n g makes a list of n elements which are all generated randomly using g.
val sample_without_duplicates : cmp:('a->'a-> int)-> int ->'at->'a listt
sample_without_replacement n g makes a list of n elements which are all generated randomly using g with the added constraint that none of the generated random values are equal.
retry g calls g until it returns some value, or until the maximum number of retries was reached. If g fails, then it counts for one iteration, and the generator retries.
parameter max:
maximum number of retries. Default 10.
val try_successively : 'a optiont list->'a optiont
try_successively l tries each generator of l, one after the other. If some generator succeeds its result is returned, else the next generator is tried.
a <?> b is a choice operator. It first tries a, and returns its result if successful. If a fails, then b is returned.
val fix : ?sub1:('at->'at) list->?sub2:('at->'at->'at) list->?subn:(int t * ('a listt->'at)) list->base:'at->int t->'at
Recursion combinators, for building recursive values. The integer generator is used to provide fuel. The sub_ generators should use their arguments only once!
replicate n g makes a list of n elements which are all generated randomly using g.
val sample_without_duplicates : cmp:('a->'a-> int)->int ->'at->'a listt
sample_without_replacement n g makes a list of n elements which are all generated randomly using g with the added constraint that none of the generated random values are equal.
retry g calls g until it returns some value, or until the maximum number of retries was reached. If g fails, then it counts for one iteration, and the generator retries.
parametermax:
maximum number of retries. Default 10.
val try_successively : 'a optiont list->'a optiont
try_successively l tries each generator of l, one after the other. If some generator succeeds its result is returned, else the next generator is tried.
a <?> b is a choice operator. It first tries a, and returns its result if successful. If a fails, then b is returned.
val fix : ?sub1:('at->'at) list->?sub2:('at->'at->'at) list->
+?subn:(int t * ('a listt->'at)) list->base:'at->int t->'at
Recursion combinators, for building recursive values. The integer generator is used to provide fuel. The sub_ generators should use their arguments only once!
Using a random state (possibly the one in argument) run a generator.
\ No newline at end of file
diff --git a/dev/containers/CCRef/index.html b/dev/containers/CCRef/index.html
index f3d7ede0..52c45b31 100644
--- a/dev/containers/CCRef/index.html
+++ b/dev/containers/CCRef/index.html
@@ -1,2 +1,2 @@
-CCRef (containers.CCRef)
Module CCRef
References
since
0.9
type'a printer = Stdlib.Format.formatter ->'a-> unit
\ No newline at end of file
diff --git a/dev/containers/CCResult/Infix/index.html b/dev/containers/CCResult/Infix/index.html
index 4a430d59..05934401 100644
--- a/dev/containers/CCResult/Infix/index.html
+++ b/dev/containers/CCResult/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCResult.Infix)
val (>>=) : ('a, 'err)t->('a->('b, 'err)t)->('b, 'err)t
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
val (<*>) : ('a->'b, 'err)t->('a, 'err)t->('b, 'err)t
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
val (>>=) : ('a, 'err)t->('a->('b, 'err)t)->('b, 'err)t
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
val (<*>) : ('a->'b, 'err)t->('a, 'err)t->('b, 'err)t
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
diff --git a/dev/containers/CCResult/Traverse/argument-1-M/index.html b/dev/containers/CCResult/Traverse/argument-1-M/index.html
index 2bb72a9c..f891b57e 100644
--- a/dev/containers/CCResult/Traverse/argument-1-M/index.html
+++ b/dev/containers/CCResult/Traverse/argument-1-M/index.html
@@ -1,2 +1,2 @@
-1-M (containers.CCResult.Traverse.1-M)
\ No newline at end of file
diff --git a/dev/containers/CCResult/Traverse/index.html b/dev/containers/CCResult/Traverse/index.html
index a55daa82..8726be83 100644
--- a/dev/containers/CCResult/Traverse/index.html
+++ b/dev/containers/CCResult/Traverse/index.html
@@ -1,2 +1,2 @@
-Traverse (containers.CCResult.Traverse)
val fold_m : ('b->'a->'bM.t)->'b->('a, 'err)t->'bM.t
val map_m : ('a->'bM.t)->('a, 'err)t->('b, 'err)tM.t
val retry_m : int ->(unit ->('a, 'err)tM.t)->('a, 'err list)tM.t
\ No newline at end of file
diff --git a/dev/containers/CCResult/index.html b/dev/containers/CCResult/index.html
index 937e237a..02187a42 100644
--- a/dev/containers/CCResult/index.html
+++ b/dev/containers/CCResult/index.html
@@ -1,2 +1,2 @@
-CCResult (containers.CCResult)
Module CCResult
Error Monad
Uses the new "result" type from OCaml 4.03.
since
0.16
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a equal = 'a->'a-> bool
type'a ord = 'a->'a-> int
type'a printer = Stdlib.Format.formatter ->'a-> unit
Basics
typenonrec(+'good, +'bad) result = ('good, 'bad) Stdlib.result =
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.
val both : ('a, 'err)t->('b, 'err)t->('a * 'b, 'err)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.
val (>>=) : ('a, 'err)t->('a->('b, 'err)t)->('b, 'err)t
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
val (<*>) : ('a->'b, 'err)t->('a, 'err)t->('b, 'err)t
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
val flatten_l : ('a, 'err)t list->('a list, 'err)t
Same as map_l id: returns Ok [x1;…;xn] if l=[Ok x1; …; Ok xn], or the first error otherwise.
since
2.7
val map_l : ('a->('b, 'err)t)->'a list->('b list, 'err)t
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_l : ('b->'a->('b, 'err)t)->'b->'a list->('b, 'err)t
val fold_iter : ('b->'a->('b, 'err)t)->'b->'aiter->('b, 'err)t
choose l selects a member of l that is a Ok _ value, or returns Error l otherwise, where l is the list of errors.
val retry : int ->(unit ->('a, 'err)t)->('a, 'err list)t
retry n f calls f at most n times, returning the first result of f () that doesn't fail. If f fails n times, retry n f fails with the list of successive errors.
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.
val both : ('a, 'err)t->('b, 'err)t->('a * 'b, 'err)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.
val (>>=) : ('a, 'err)t->('a->('b, 'err)t)->('b, 'err)t
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
val (<*>) : ('a->'b, 'err)t->('a, 'err)t->('b, 'err)t
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
val flatten_l : ('a, 'err)t list->('a list, 'err)t
Same as map_l id: returns Ok [x1;…;xn] if l=[Ok x1; …; Ok xn], or the first error otherwise.
since 2.7
val map_l : ('a->('b, 'err)t)->'a list->('b list, 'err)t
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_l : ('b->'a->('b, 'err)t)->'b->'a list->('b, 'err)t
val fold_iter : ('b->'a->('b, 'err)t)->'b->'aiter->('b, 'err)t
choose l selects a member of l that is a Ok _ value, or returns Error l otherwise, where l is the list of errors.
val retry : int ->(unit ->('a, 'err)t)->('a, 'err list)t
retry n f calls f at most n times, returning the first result of f () that doesn't fail. If f fails n times, retry n f fails with the list of successive errors.
\ No newline at end of file
diff --git a/dev/containers/CCResult/module-type-MONAD/index.html b/dev/containers/CCResult/module-type-MONAD/index.html
index 6a95c1f2..c19b64c8 100644
--- a/dev/containers/CCResult/module-type-MONAD/index.html
+++ b/dev/containers/CCResult/module-type-MONAD/index.html
@@ -1,2 +1,2 @@
-MONAD (containers.CCResult.MONAD)
\ No newline at end of file
diff --git a/dev/containers/CCSeq/Infix/index.html b/dev/containers/CCSeq/Infix/index.html
index 74e410ca..00bd7f03 100644
--- a/dev/containers/CCSeq/Infix/index.html
+++ b/dev/containers/CCSeq/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCSeq.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCSeq/Traverse/argument-1-M/index.html b/dev/containers/CCSeq/Traverse/argument-1-M/index.html
index df0a6e1d..6165b8eb 100644
--- a/dev/containers/CCSeq/Traverse/argument-1-M/index.html
+++ b/dev/containers/CCSeq/Traverse/argument-1-M/index.html
@@ -1,2 +1,2 @@
-1-M (containers.CCSeq.Traverse.1-M)
\ No newline at end of file
diff --git a/dev/containers/CCSeq/Traverse/index.html b/dev/containers/CCSeq/Traverse/index.html
index bbc4c842..06456274 100644
--- a/dev/containers/CCSeq/Traverse/index.html
+++ b/dev/containers/CCSeq/Traverse/index.html
@@ -1,2 +1,2 @@
-Traverse (containers.CCSeq.Traverse)
\ No newline at end of file
diff --git a/dev/containers/CCSeq/index.html b/dev/containers/CCSeq/index.html
index 63dbca4c..5edd9f2f 100644
--- a/dev/containers/CCSeq/index.html
+++ b/dev/containers/CCSeq/index.html
@@ -1,2 +1,2 @@
-CCSeq (containers.CCSeq)
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.
for_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.
exists 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.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf s formats the sequence s 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
+CCSeq (containers.CCSeq)
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.
for_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.
exists 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.
pp ~pp_start ~pp_stop ~pp_sep pp_item ppf s formats the sequence s 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/CCSeq/module-type-MONAD/index.html b/dev/containers/CCSeq/module-type-MONAD/index.html
index 82d251ba..ae81a081 100644
--- a/dev/containers/CCSeq/module-type-MONAD/index.html
+++ b/dev/containers/CCSeq/module-type-MONAD/index.html
@@ -1,2 +1,2 @@
-MONAD (containers.CCSeq.MONAD)
\ No newline at end of file
diff --git a/dev/containers/CCSet/Make/index.html b/dev/containers/CCSet/Make/index.html
new file mode 100644
index 00000000..a3cda6b3
--- /dev/null
+++ b/dev/containers/CCSet/Make/index.html
@@ -0,0 +1,3 @@
+
+Make (containers.CCSet.Make)
\ No newline at end of file
diff --git a/dev/containers/CCSet/index.html b/dev/containers/CCSet/index.html
index 421e7c90..a6f45757 100644
--- a/dev/containers/CCSet/index.html
+++ b/dev/containers/CCSet/index.html
@@ -1,2 +1,2 @@
-CCSet (containers.CCSet)
Module CCSet
Wrapper around Set
since
0.9
type'a iter = ('a-> unit)-> unit
Fast internal iterator.
since
2.8
type'a printer = Stdlib.Format.formatter ->'a-> unit
moduleMake (O : Stdlib.Set.OrderedType) : Swithtypet = Stdlib.Set.Make(O).tandtypeelt = O.t
\ No newline at end of file
diff --git a/dev/containers/CCSet/module-type-S/index.html b/dev/containers/CCSet/module-type-S/index.html
index bb875c98..e70fbc19 100644
--- a/dev/containers/CCSet/module-type-S/index.html
+++ b/dev/containers/CCSet/module-type-S/index.html
@@ -1,2 +1,3 @@
-S (containers.CCSet.S)
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Decoder/index.html b/dev/containers/CCSexp/Decoder/index.html
index 9cf81d88..45c9a3b5 100644
--- a/dev/containers/CCSexp/Decoder/index.html
+++ b/dev/containers/CCSexp/Decoder/index.html
@@ -1,2 +1,2 @@
-Decoder (containers.CCSexp.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since
3.3
\ No newline at end of file
+Decoder (containers.CCSexp.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since 3.3
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Make/Decoder/index.html b/dev/containers/CCSexp/Make/Decoder/index.html
index e1418126..b392c241 100644
--- a/dev/containers/CCSexp/Make/Decoder/index.html
+++ b/dev/containers/CCSexp/Make/Decoder/index.html
@@ -1,2 +1,2 @@
-Decoder (containers.CCSexp.Make.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since
3.3
\ No newline at end of file
+Decoder (containers.CCSexp.Make.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since 3.3
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Make/argument-1-Sexp/index.html b/dev/containers/CCSexp/Make/argument-1-Sexp/index.html
index 768de379..2ae33618 100644
--- a/dev/containers/CCSexp/Make/argument-1-Sexp/index.html
+++ b/dev/containers/CCSexp/Make/argument-1-Sexp/index.html
@@ -1,2 +1,2 @@
-1-Sexp (containers.CCSexp.Make.1-Sexp)
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Make/index.html b/dev/containers/CCSexp/Make/index.html
index 961e4f19..95fa0efd 100644
--- a/dev/containers/CCSexp/Make/index.html
+++ b/dev/containers/CCSexp/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.CCSexp.Make)
Module CCSexp.Make
Functorized operations
This builds a parser and printer for S-expressions represented as in the Sexp argument.
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
\ No newline at end of file
diff --git a/dev/containers/CCSexp/index.html b/dev/containers/CCSexp/index.html
index d70fa23b..42f7da2b 100644
--- a/dev/containers/CCSexp/index.html
+++ b/dev/containers/CCSexp/index.html
@@ -1,2 +1,2 @@
-CCSexp (containers.CCSexp)
Module CCSexp
Handling S-expressions
since
3.0 moved into containers-core, previously in [containers.sexp]
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since
3.3
\ No newline at end of file
diff --git a/dev/containers/CCSexp/module-type-S/index.html b/dev/containers/CCSexp/module-type-S/index.html
deleted file mode 100644
index 74b15159..00000000
--- a/dev/containers/CCSexp/module-type-S/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-S (containers.CCSexp.S)
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/index.html b/dev/containers/CCSexp_intf/index.html
index b1c42793..babdd408 100644
--- a/dev/containers/CCSexp_intf/index.html
+++ b/dev/containers/CCSexp_intf/index.html
@@ -1,2 +1,2 @@
-CCSexp_intf (containers.CCSexp_intf)
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html b/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html
index 289c6113..c053f76a 100644
--- a/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html
+++ b/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html
@@ -1,2 +1,2 @@
-BASIC_SEXP (containers.CCSexp_intf.BASIC_SEXP)
val match_ : t->atom:(string ->'a)->list:(t list->'a)->'a
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html
index a984329b..8dec981c 100644
--- a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html
+++ b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html
@@ -1,2 +1,2 @@
-Decoder (containers.CCSexp_intf.S.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since
3.3
\ No newline at end of file
+Decoder (containers.CCSexp_intf.S.Decoder)
Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.
since 3.3
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/module-type-S/index.html b/dev/containers/CCSexp_intf/module-type-S/index.html
index 4aaed228..74d4ca62 100644
--- a/dev/containers/CCSexp_intf/module-type-S/index.html
+++ b/dev/containers/CCSexp_intf/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers.CCSexp_intf.S)
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen : Stdlib.in_channel ->tor_errorgen
Parse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel ->t listor_error
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen : Stdlib.in_channel ->tor_errorgen
Parse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel ->t listor_error
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/module-type-S0/index.html b/dev/containers/CCSexp_intf/module-type-S0/index.html
index 99564e73..f59a22d5 100644
--- a/dev/containers/CCSexp_intf/module-type-S0/index.html
+++ b/dev/containers/CCSexp_intf/module-type-S0/index.html
@@ -1,2 +1,2 @@
-S0 (containers.CCSexp_intf.S0)
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen : Stdlib.in_channel ->tor_errorgen
Parse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel ->t listor_error
Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).
val parse_chan_gen : Stdlib.in_channel ->tor_errorgen
Parse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel ->t listor_error
\ No newline at end of file
diff --git a/dev/containers/CCSexp_intf/module-type-SEXP/index.html b/dev/containers/CCSexp_intf/module-type-SEXP/index.html
index 5c46e182..9ee5df34 100644
--- a/dev/containers/CCSexp_intf/module-type-SEXP/index.html
+++ b/dev/containers/CCSexp_intf/module-type-SEXP/index.html
@@ -1,2 +1,2 @@
-SEXP (containers.CCSexp_intf.SEXP)
Module type CCSexp_intf.SEXP
Abstract representation of S-expressions (extended)
\ No newline at end of file
diff --git a/dev/containers/CCSexp_lex/index.html b/dev/containers/CCSexp_lex/index.html
index 8055f5c9..6956a6a7 100644
--- a/dev/containers/CCSexp_lex/index.html
+++ b/dev/containers/CCSexp_lex/index.html
@@ -1,2 +1,2 @@
-CCSexp_lex (containers.CCSexp_lex)
Module CCSexp_lex
type token =
| ATOMof string
| LIST_OPEN
| LIST_CLOSE
| SEXP_COMMENT
| EOI
exceptionErrorof int * int * string
val error : Stdlib.Lexing.lexbuf -> string ->'a
type unescape_state =
| Not_escaped
| Escaped
| Escaped_int_1of int
| Escaped_int_2of int
val char_equal : char -> char -> bool
val remove_quotes : Stdlib.Lexing.lexbuf -> string -> string
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf ->int ->token
\ No newline at end of file
diff --git a/dev/containers/CCShimsArrayLabels_/Floatarray/index.html b/dev/containers/CCShimsArrayLabels_/Floatarray/index.html
index 454d9cf8..a4e94702 100644
--- a/dev/containers/CCShimsArrayLabels_/Floatarray/index.html
+++ b/dev/containers/CCShimsArrayLabels_/Floatarray/index.html
@@ -1,2 +1,2 @@
-Floatarray (containers.CCShimsArrayLabels_.Floatarray)
Module CCShimsArrayLabels_.Floatarray
val create : int -> floatarray
val length : floatarray -> int
val get : floatarray -> int -> float
val set : floatarray -> int -> float -> unit
val unsafe_get : floatarray -> int -> float
val unsafe_set : floatarray -> int -> float -> unit
\ No newline at end of file
+Floatarray (containers.CCShimsArrayLabels_.Floatarray)
Module CCShimsArrayLabels_.Floatarray
val create : int -> floatarray
val length : floatarray -> int
val get : floatarray ->int -> float
val set : floatarray ->int ->float -> unit
val unsafe_get : floatarray ->int -> float
val unsafe_set : floatarray ->int ->float -> unit
\ No newline at end of file
diff --git a/dev/containers/CCShimsArrayLabels_/index.html b/dev/containers/CCShimsArrayLabels_/index.html
index 764a8401..874bdd12 100644
--- a/dev/containers/CCShimsArrayLabels_/index.html
+++ b/dev/containers/CCShimsArrayLabels_/index.html
@@ -1,2 +1,3 @@
-CCShimsArrayLabels_ (containers.CCShimsArrayLabels_)
\ No newline at end of file
diff --git a/dev/containers/CCShimsArray_/index.html b/dev/containers/CCShimsArray_/index.html
index cd91e3b1..be080fe5 100644
--- a/dev/containers/CCShimsArray_/index.html
+++ b/dev/containers/CCShimsArray_/index.html
@@ -1,2 +1,2 @@
-CCShimsArray_ (containers.CCShimsArray_)
val create_matrix : int ->int ->'a->'a array array
val append : 'a array->'a array->'a array
val concat : 'a array list->'a array
val sub : 'a array->int ->int ->'a array
val copy : 'a array->'a array
val fill : 'a array->int ->int ->'a-> unit
val blit : 'a array->int ->'a array->int ->int -> unit
val to_list : 'a array->'a list
val of_list : 'a list->'a array
val iter : ('a-> unit)->'a array-> unit
val iteri : (int ->'a-> unit)->'a array-> unit
val map : ('a->'b)->'a array->'b array
val mapi : (int ->'a->'b)->'a array->'b array
val fold_left : ('a->'b->'a)->'a->'b array->'a
val fold_right : ('b->'a->'a)->'b array->'a->'a
val iter2 : ('a->'b-> unit)->'a array->'b array-> unit
val map2 : ('a->'b->'c)->'a array->'b array->'c array
val for_all : ('a-> bool)->'a array-> bool
val exists : ('a-> bool)->'a array-> bool
val for_all2 : ('a->'b-> bool)->'a array->'b array-> bool
val exists2 : ('a->'b-> bool)->'a array->'b array-> bool
val mem : 'a->'a array-> bool
val memq : 'a->'a array-> bool
val sort : ('a->'a-> int)->'a array-> unit
val stable_sort : ('a->'a-> int)->'a array-> unit
val fast_sort : ('a->'a-> int)->'a array-> unit
val to_seq : 'a array->'aStdlib.Seq.t
val to_seqi : 'a array->(int * 'a)Stdlib.Seq.t
val of_seq : 'aStdlib.Seq.t->'a array
val unsafe_get : 'a array->int ->'a
val unsafe_set : 'a array->int ->'a-> unit
moduleFloatarray = Stdlib__array.Floatarray
\ No newline at end of file
diff --git a/dev/containers/CCShimsEither_/index.html b/dev/containers/CCShimsEither_/index.html
index 3354344a..0dfff96f 100644
--- a/dev/containers/CCShimsEither_/index.html
+++ b/dev/containers/CCShimsEither_/index.html
@@ -1,2 +1,2 @@
-CCShimsEither_ (containers.CCShimsEither_)
Module CCShimsEither_
type('a, 'b) t = ('a, 'b) Stdlib.Either.t =
| Leftof'a
| Rightof'b
\ No newline at end of file
+CCShimsEither_ (containers.CCShimsEither_)
Module CCShimsEither_
type('a, 'b) t = ('a, 'b)Stdlib.Either.t =
| Leftof'a
| Rightof'b
\ No newline at end of file
diff --git a/dev/containers/CCShimsFormat_/index.html b/dev/containers/CCShimsFormat_/index.html
index dbd76a6d..b6fafeec 100644
--- a/dev/containers/CCShimsFormat_/index.html
+++ b/dev/containers/CCShimsFormat_/index.html
@@ -1,2 +1,4 @@
-CCShimsFormat_ (containers.CCShimsFormat_)
Module CCShimsFormat_
val pp_open_tag : Stdlib.Format.formatter -> Stdlib.Format.tag -> unit
val pp_close_tag : Stdlib.Format.formatter -> unit -> unit
val pp_get_formatter_tag_functions : Stdlib.Format.formatter -> unit -> Stdlib.Format.formatter_tag_functions
val pp_set_formatter_tag_functions : Stdlib.Format.formatter -> Stdlib.Format.formatter_tag_functions -> unit
\ No newline at end of file
diff --git a/dev/containers/CCShimsFun_/index.html b/dev/containers/CCShimsFun_/index.html
index 35b078b4..5c23fa62 100644
--- a/dev/containers/CCShimsFun_/index.html
+++ b/dev/containers/CCShimsFun_/index.html
@@ -1,2 +1,2 @@
-CCShimsFun_ (containers.CCShimsFun_)
Module CCShimsFun_
includemoduletypeof Stdlib.Fun
val id : 'a->'a
val const : 'a->'b->'a
val flip : ('a->'b->'c)->'b->'a->'c
val negate : ('a-> bool)->'a-> bool
val protect : finally:(unit -> unit)->(unit ->'a)->'a
exceptionFinally_raisedof exn
\ No newline at end of file
+CCShimsFun_ (containers.CCShimsFun_)
Module CCShimsFun_
includemoduletypeofStdlib.Fun
val id : 'a->'a
val const : 'a->'b->'a
val flip : ('a->'b->'c)->'b->'a->'c
val negate : ('a-> bool)->'a-> bool
val protect : finally:(unit -> unit)->(unit ->'a)->'a
exceptionFinally_raisedof exn
\ No newline at end of file
diff --git a/dev/containers/CCShimsInt_/index.html b/dev/containers/CCShimsInt_/index.html
index 4fce7ffa..a01f9644 100644
--- a/dev/containers/CCShimsInt_/index.html
+++ b/dev/containers/CCShimsInt_/index.html
@@ -1,2 +1,2 @@
-CCShimsInt_ (containers.CCShimsInt_)
\ No newline at end of file
diff --git a/dev/containers/CCShimsList_/index.html b/dev/containers/CCShimsList_/index.html
index 6df21c00..278c399b 100644
--- a/dev/containers/CCShimsList_/index.html
+++ b/dev/containers/CCShimsList_/index.html
@@ -1,2 +1,2 @@
-CCShimsList_ (containers.CCShimsList_)
Module CCShimsList_
include Stdlib.List
type!'a t = 'a list =
| ([])
| (::)of'a * 'a list
val length : 'a list-> int
val compare_lengths : 'a list->'b list-> int
val compare_length_with : 'a list-> int -> int
val cons : 'a->'a list->'a list
val hd : 'a list->'a
val tl : 'a list->'a list
val nth : 'a list-> int ->'a
val nth_opt : 'a list-> int ->'a option
val rev : 'a list->'a list
val init : int ->(int ->'a)->'a list
val append : 'a list->'a list->'a list
val rev_append : 'a list->'a list->'a list
val concat : 'a list list->'a list
val flatten : 'a list list->'a list
val equal : ('a->'a-> bool)->'a list->'a list-> bool
val compare : ('a->'a-> int)->'a list->'a list-> int
val iter : ('a-> unit)->'a list-> unit
val iteri : (int ->'a-> unit)->'a list-> unit
val map : ('a->'b)->'a list->'b list
val mapi : (int ->'a->'b)->'a list->'b list
val rev_map : ('a->'b)->'a list->'b list
val filter_map : ('a->'b option)->'a list->'b list
val concat_map : ('a->'b list)->'a list->'b list
val fold_left_map : ('a->'b->'a * 'c)->'a->'b list->'a * 'c list
val fold_left : ('a->'b->'a)->'a->'b list->'a
val fold_right : ('a->'b->'b)->'a list->'b->'b
val iter2 : ('a->'b-> unit)->'a list->'b list-> unit
val map2 : ('a->'b->'c)->'a list->'b list->'c list
val rev_map2 : ('a->'b->'c)->'a list->'b list->'c list
val fold_left2 : ('a->'b->'c->'a)->'a->'b list->'c list->'a
val fold_right2 : ('a->'b->'c->'c)->'a list->'b list->'c->'c
val for_all : ('a-> bool)->'a list-> bool
val exists : ('a-> bool)->'a list-> bool
val for_all2 : ('a->'b-> bool)->'a list->'b list-> bool
val exists2 : ('a->'b-> bool)->'a list->'b list-> bool
val mem : 'a->'a list-> bool
val memq : 'a->'a list-> bool
val find : ('a-> bool)->'a list->'a
val find_opt : ('a-> bool)->'a list->'a option
val find_map : ('a->'b option)->'a list->'b option
val filter : ('a-> bool)->'a list->'a list
val find_all : ('a-> bool)->'a list->'a list
val filteri : (int ->'a-> bool)->'a list->'a list
val partition : ('a-> bool)->'a list->'a list * 'a list
val partition_map : ('a->('b, 'c) Stdlib.Either.t)->'a list->'b list * 'c list
val assoc : 'a->('a * 'b) list->'b
val assoc_opt : 'a->('a * 'b) list->'b option
val assq : 'a->('a * 'b) list->'b
val assq_opt : 'a->('a * 'b) list->'b option
val mem_assoc : 'a->('a * 'b) list-> bool
val mem_assq : 'a->('a * 'b) list-> bool
val remove_assoc : 'a->('a * 'b) list->('a * 'b) list
val remove_assq : 'a->('a * 'b) list->('a * 'b) list
val split : ('a * 'b) list->'a list * 'b list
val combine : 'a list->'b list->('a * 'b) list
val sort : ('a->'a-> int)->'a list->'a list
val stable_sort : ('a->'a-> int)->'a list->'a list
val fast_sort : ('a->'a-> int)->'a list->'a list
val sort_uniq : ('a->'a-> int)->'a list->'a list
val merge : ('a->'a-> int)->'a list->'a list->'a list
val to_seq : 'a list->'a Stdlib.Seq.t
val of_seq : 'a Stdlib.Seq.t->'a list
\ No newline at end of file
+CCShimsList_ (containers.CCShimsList_)
Module CCShimsList_
includemoduletypeofstructincludeStdlib.List end
type!'a t = 'a list =
| []
| ::of'a * 'a list
val length : 'a list-> int
val compare_lengths : 'a list->'b list-> int
val compare_length_with : 'a list->int -> int
val cons : 'a->'a list->'a list
val hd : 'a list->'a
val tl : 'a list->'a list
val nth : 'a list->int ->'a
val nth_opt : 'a list->int ->'a option
val rev : 'a list->'a list
val init : int ->(int ->'a)->'a list
val append : 'a list->'a list->'a list
val rev_append : 'a list->'a list->'a list
val concat : 'a list list->'a list
val flatten : 'a list list->'a list
val equal : ('a->'a-> bool)->'a list->'a list-> bool
val compare : ('a->'a-> int)->'a list->'a list-> int
val iter : ('a-> unit)->'a list-> unit
val iteri : (int ->'a-> unit)->'a list-> unit
val map : ('a->'b)->'a list->'b list
val mapi : (int ->'a->'b)->'a list->'b list
val rev_map : ('a->'b)->'a list->'b list
val filter_map : ('a->'b option)->'a list->'b list
val concat_map : ('a->'b list)->'a list->'b list
val fold_left_map : ('a->'b->'a * 'c)->'a->'b list->'a * 'c list
val fold_left : ('a->'b->'a)->'a->'b list->'a
val fold_right : ('a->'b->'b)->'a list->'b->'b
val iter2 : ('a->'b-> unit)->'a list->'b list-> unit
val map2 : ('a->'b->'c)->'a list->'b list->'c list
val rev_map2 : ('a->'b->'c)->'a list->'b list->'c list
val fold_left2 : ('a->'b->'c->'a)->'a->'b list->'c list->'a
val fold_right2 : ('a->'b->'c->'c)->'a list->'b list->'c->'c
val for_all : ('a-> bool)->'a list-> bool
val exists : ('a-> bool)->'a list-> bool
val for_all2 : ('a->'b-> bool)->'a list->'b list-> bool
val exists2 : ('a->'b-> bool)->'a list->'b list-> bool
val mem : 'a->'a list-> bool
val memq : 'a->'a list-> bool
val find : ('a-> bool)->'a list->'a
val find_opt : ('a-> bool)->'a list->'a option
val find_map : ('a->'b option)->'a list->'b option
val filter : ('a-> bool)->'a list->'a list
val find_all : ('a-> bool)->'a list->'a list
val filteri : (int ->'a-> bool)->'a list->'a list
val partition : ('a-> bool)->'a list->'a list * 'a list
val partition_map : ('a->('b, 'c)Stdlib.Either.t)->'a list->'b list * 'c list
val assoc : 'a->('a * 'b) list->'b
val assoc_opt : 'a->('a * 'b) list->'b option
val assq : 'a->('a * 'b) list->'b
val assq_opt : 'a->('a * 'b) list->'b option
val mem_assoc : 'a->('a * 'b) list-> bool
val mem_assq : 'a->('a * 'b) list-> bool
val remove_assoc : 'a->('a * 'b) list->('a * 'b) list
val remove_assq : 'a->('a * 'b) list->('a * 'b) list
val split : ('a * 'b) list->'a list * 'b list
val combine : 'a list->'b list->('a * 'b) list
val sort : ('a->'a-> int)->'a list->'a list
val stable_sort : ('a->'a-> int)->'a list->'a list
val fast_sort : ('a->'a-> int)->'a list->'a list
val sort_uniq : ('a->'a-> int)->'a list->'a list
val merge : ('a->'a-> int)->'a list->'a list->'a list
val to_seq : 'a list->'aStdlib.Seq.t
val of_seq : 'aStdlib.Seq.t->'a list
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html b/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html
index 5e296c56..a8255771 100644
--- a/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html
+++ b/dev/containers/CCShimsMkLetList_/Make/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers.CCShimsMkLetList_.Make.1-X)
Parameter Make.1-X
val combine_shortest : 'a list->'b list->('a * 'b) list
\ No newline at end of file
+X (containers.CCShimsMkLetList_.Make.1-X)
Parameter Make.1-X
val combine_shortest : 'a list->'b list->('a * 'b) list
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/Make/index.html b/dev/containers/CCShimsMkLetList_/Make/index.html
index 995d8460..66c9b2d6 100644
--- a/dev/containers/CCShimsMkLetList_/Make/index.html
+++ b/dev/containers/CCShimsMkLetList_/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.CCShimsMkLetList_.Make)
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLetList_/index.html b/dev/containers/CCShimsMkLetList_/index.html
index 7aae4aa2..6a91dd23 100644
--- a/dev/containers/CCShimsMkLetList_/index.html
+++ b/dev/containers/CCShimsMkLetList_/index.html
@@ -1,2 +1,2 @@
-CCShimsMkLetList_ (containers.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
index f6a338eb..93318931 100644
--- a/dev/containers/CCShimsMkLetList_/module-type-S/index.html
+++ b/dev/containers/CCShimsMkLetList_/module-type-S/index.html
@@ -1,9 +1,9 @@
-S (containers.CCShimsMkLetList_.S)
Module type CCShimsMkLetList_.S
val and& : 'a list->'b list->('a * 'b) list
(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 =
+S (containers.CCShimsMkLetList_.S)
Module type CCShimsMkLetList_.S
val and& : 'a list->'b list->('a * 'b) list
(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]
since
3.1
\ No newline at end of file
+- : int list = [16; 18]
since 3.1
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html b/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html
index cbd55c98..2142bb5e 100644
--- a/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html
+++ b/dev/containers/CCShimsMkLet_/Make/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers.CCShimsMkLet_.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
index 07fe814e..4440e348 100644
--- a/dev/containers/CCShimsMkLet_/Make/index.html
+++ b/dev/containers/CCShimsMkLet_/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.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
index b4b4d850..bc67a0b2 100644
--- a/dev/containers/CCShimsMkLet_/Make2/argument-1-X/index.html
+++ b/dev/containers/CCShimsMkLet_/Make2/argument-1-X/index.html
@@ -1,2 +1,2 @@
-1-X (containers.CCShimsMkLet_.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
index 13d0422f..d7d40efa 100644
--- a/dev/containers/CCShimsMkLet_/Make2/index.html
+++ b/dev/containers/CCShimsMkLet_/Make2/index.html
@@ -1,2 +1,2 @@
-Make2 (containers.CCShimsMkLet_.Make2)
\ No newline at end of file
diff --git a/dev/containers/CCShimsMkLet_/index.html b/dev/containers/CCShimsMkLet_/index.html
index 19a362f7..a19de01c 100644
--- a/dev/containers/CCShimsMkLet_/index.html
+++ b/dev/containers/CCShimsMkLet_/index.html
@@ -1,2 +1,2 @@
-CCShimsMkLet_ (containers.CCShimsMkLet_)
\ 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
index 31d48cad..7b5eb75d 100644
--- a/dev/containers/CCShimsMkLet_/module-type-S/index.html
+++ b/dev/containers/CCShimsMkLet_/module-type-S/index.html
@@ -1,2 +1,2 @@
-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
index 84e54e33..6007cd88 100644
--- a/dev/containers/CCShimsMkLet_/module-type-S2/index.html
+++ b/dev/containers/CCShimsMkLet_/module-type-S2/index.html
@@ -1,2 +1,2 @@
-S2 (containers.CCShimsMkLet_.S2)
Module type CCShimsMkLet_.S2
type('a, 'e) t_let2
val let+ : ('a, 'e)t_let2->('a->'b)->('b, 'e)t_let2
\ No newline at end of file
diff --git a/dev/containers/CCShims_/index.html b/dev/containers/CCShims_/index.html
index 75cc8b9c..a1cfbeb9 100644
--- a/dev/containers/CCShims_/index.html
+++ b/dev/containers/CCShims_/index.html
@@ -1,2 +1,2 @@
-CCShims_ (containers.CCShims_)
Module CCShims_
module Stdlib = Stdlib
\ No newline at end of file
+CCShims_ (containers.CCShims_)
Module CCShims_
moduleStdlib = Stdlib
\ No newline at end of file
diff --git a/dev/containers/CCString/Find/index.html b/dev/containers/CCString/Find/index.html
index a2f045a0..a4fc9bc3 100644
--- a/dev/containers/CCString/Find/index.html
+++ b/dev/containers/CCString/Find/index.html
@@ -1,2 +1,2 @@
-Find (containers.CCString.Find)
val find : ?start:int ->pattern:[ `Direct ]pattern->string -> int
find ~start ~pattern s searches for pattern in the string s, left-to-right.
returns
the offset of the first match, -1 otherwise.
parameterstart
offset in string at which we start.
val rfind : ?start:int ->pattern:[ `Reverse ]pattern->string -> int
rfind ~start ~pattern s searches for pattern in the string s, right-to-left.
returns
the offset of the start of the first match from the right, -1 otherwise.
parameterstart
right-offset in string at which we start.
\ No newline at end of file
diff --git a/dev/containers/CCString/Infix/index.html b/dev/containers/CCString/Infix/index.html
index d8e2915e..030dc07b 100644
--- a/dev/containers/CCString/Infix/index.html
+++ b/dev/containers/CCString/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCString.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCString/Split/index.html b/dev/containers/CCString/Split/index.html
index 52af5054..1d906c31 100644
--- a/dev/containers/CCString/Split/index.html
+++ b/dev/containers/CCString/Split/index.html
@@ -1,2 +1,2 @@
-Split (containers.CCString.Split)
Module CCString.Split
type drop_if_empty = {
first : bool;
last : bool;
}
Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".
{first=false; last=false} will return ""; "a"; "b"; ""
{first=true; last=false} will return "a"; "b" ""
{first=false; last=true} will return ""; "a"; "b"
{first=true; last=true} will return "a"; "b"
The default value of all remaining functions is Drop_none.
no_drop does not drop any group, even empty and on borders.
since
1.5
val list_ : ?drop:drop_if_empty->by:string-> string ->(string * int * int) list
list_ ~drop ~by s splits the given string s along the given separator by. Should only be used with very small separators, otherwise use Containers_string.KMP.
returns
a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.
raises Failure
if by = "".
val gen : ?drop:drop_if_empty->by:string-> string ->(string * int * int)gen
gen ~drop ~by s splits the given string s along the given separator by. Returns a gen of slices.
val iter : ?drop:drop_if_empty->by:string-> string ->(string * int * int)iter
iter ~drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
since
2.8
val seq : ?drop:drop_if_empty->by:string-> string ->(string * int * int) Stdlib.Seq.t
seq ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.
since
3.0
Copying functions
Those split functions actually copy the substrings, which can be more convenient but less efficient in general.
val list_cpy : ?drop:drop_if_empty->by:string-> string ->string list
list_cpy ~drop ~by s splits the given string s along the given separator by. Returns a list of strings.
val gen_cpy : ?drop:drop_if_empty->by:string-> string ->string gen
gen_cpy ~drop ~by s splits the given string s along the given separator by. Returns a gen of strings.
val iter_cpy : ?drop:drop_if_empty->by:string-> string ->string iter
iter_cpy ~drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
since
2.8
val seq_cpy : ?drop:drop_if_empty->by:string-> string ->string Stdlib.Seq.t
seq_cpy ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.
since
3.0
val left : by:string-> string ->(string * string) option
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
since
0.12
val left_exn : by:string-> string -> string * string
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
raises Not_found
if by is not part of the string s.
since
0.16
val right : by:string-> string ->(string * string) option
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
since
0.12
val right_exn : by:string-> string -> string * string
right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.
raises Not_found
if by is not part of the string s.
since
0.16
\ No newline at end of file
+Split (containers.CCString.Split)
Module CCString.Split
type drop_if_empty = {
first : bool;
last : bool;
}
Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".
{first=false; last=false} will return ""; "a"; "b"; ""
{first=true; last=false} will return "a"; "b" ""
{first=false; last=true} will return ""; "a"; "b"
{first=true; last=true} will return "a"; "b"
The default value of all remaining functions is Drop_none.
no_drop does not drop any group, even empty and on borders.
since 1.5
val list_ : ?drop:drop_if_empty->by:string ->string ->(string * int * int) list
list_ ~drop ~by s splits the given string s along the given separator by. Should only be used with very small separators, otherwise use Containers_string.KMP.
returns
a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.
raisesFailure
if by = "".
val gen : ?drop:drop_if_empty->by:string ->string ->(string * int * int)gen
gen ~drop ~by s splits the given string s along the given separator by. Returns a gen of slices.
val iter : ?drop:drop_if_empty->by:string ->string ->(string * int * int)iter
iter ~drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
since 2.8
val seq : ?drop:drop_if_empty->by:string ->string ->(string * int * int)Stdlib.Seq.t
seq ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.
since 3.0
Copying functions
Those split functions actually copy the substrings, which can be more convenient but less efficient in general.
val list_cpy : ?drop:drop_if_empty->by:string ->string ->string list
list_cpy ~drop ~by s splits the given string s along the given separator by. Returns a list of strings.
val gen_cpy : ?drop:drop_if_empty->by:string ->string ->string gen
gen_cpy ~drop ~by s splits the given string s along the given separator by. Returns a gen of strings.
val iter_cpy : ?drop:drop_if_empty->by:string ->string ->string iter
iter_cpy ~drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
since 2.8
val seq_cpy : ?drop:drop_if_empty->by:string ->string ->string Stdlib.Seq.t
seq_cpy ~drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.
since 3.0
val left : by:string ->string ->(string * string) option
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
since 0.12
val left_exn : by:string ->string -> string * string
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
raisesNot_found
if by is not part of the string s.
since 0.16
val right : by:string ->string ->(string * string) option
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
since 0.12
val right_exn : by:string ->string -> string * string
right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.
raisesNot_found
if by is not part of the string s.
since 0.16
\ No newline at end of file
diff --git a/dev/containers/CCString/index.html b/dev/containers/CCString/index.html
index 85a123d2..84e0ea0f 100644
--- a/dev/containers/CCString/index.html
+++ b/dev/containers/CCString/index.html
@@ -1,2 +1,3 @@
-CCString (containers.CCString)
length s returns the length (number of characters) of the given string s.
val blit : t-> int -> Stdlib.Bytes.t -> int -> int -> unit
blit src src_pos dst dst_pos len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.
replace ~which ~sub ~by s replaces some occurrences of sub by by in s.
parameter which
decides whether the occurrences to replace are:
`Left first occurrence from the left (beginning).
`Right first occurrence from the right (end).
`All all occurrences (default).
raises Invalid_argument
if sub = "".
since
0.14
val is_sub : sub:string-> int -> string -> int ->sub_len:int-> bool
is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.
val repeat : string -> int -> string
repeat s n creates a string by repeating the string sn times.
val prefix : pre:string-> string -> bool
prefix ~pre s returns true iff pre is a prefix of s.
val suffix : suf:string-> string -> bool
suffix ~suf s returns true iff suf is a suffix of s.
since
0.7
val chop_prefix : pre:string-> string ->string option
chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.
since
0.17
val chop_suffix : suf:string-> string ->string option
chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.
since
0.17
val take : int -> string -> string
take n s keeps only the n first chars of s.
since
0.17
val drop : int -> string -> string
drop n s removes the n first chars of s.
since
0.17
val take_drop : int -> string -> string * string
take_drop n s is take n s, drop n s.
since
0.17
val lines : string ->string list
lines s returns a list of the lines of s (splits along '\n').
unlines_iter iter concatenates all strings of iter, separated with '\n'.
since
3.2
val unlines_seq : string Stdlib.Seq.t-> string
unlines_seq seq concatenates all strings of seq, separated with '\n'.
since
3.2
val set : string -> int -> char -> string
set s i c creates a new string which is a copy of s, except for index i, which becomes c.
raises Invalid_argument
if i is an invalid index.
since
0.12
val iter : (char -> unit)-> string -> unit
iter f s applies function f on each character of s. Alias to String.iter.
since
0.12
val filter_map : (char ->char option)-> string -> string
filter_map f s calls (f a0) (f a1) … (f an) where a0 … an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).
since
0.17
val filter : (char -> bool)-> string -> string
filter f s discards characters of s not satisfying f.
split_on_char by s splits the string s along the given char by.
since
1.2
val split : by:string-> string ->string list
split ~by s splits the string s along the given string by. Alias to Split.list_cpy.
since
1.2
Utils
val compare_versions : string -> string -> int
compare_versions s1 s2 compares version stringss1 and s2, considering that numbers are above text.
since
0.13
val compare_natural : string -> string -> int
compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order
since
1.3
val edit_distance : ?cutoff:int-> string -> string -> int
edit_distance ~cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.
parameter cutoff
if provided, it's a cap on the number of iterations. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 without (use edit_distance s1 s2 ~cutoff:3 <= 2). note that contrary to what was previously documented here, the result can still be higher than cutoff if it's reached in <cutoff iterations. However if the result is < cutoff then it is accurate.
length s returns the length (number of characters) of the given string s.
val blit : t->int ->Stdlib.Bytes.t ->int ->int -> unit
blit src src_pos dst dst_pos len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.
replace ~which ~sub ~by s replaces some occurrences of sub by by in s.
parameterwhich
decides whether the occurrences to replace are:
`Left first occurrence from the left (beginning).
`Right first occurrence from the right (end).
`All all occurrences (default).
raisesInvalid_argument
if sub = "".
since 0.14
val is_sub : sub:string ->int ->string ->int ->sub_len:int -> bool
is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.
val repeat : string ->int -> string
repeat s n creates a string by repeating the string sn times.
val prefix : pre:string ->string -> bool
prefix ~pre s returns true iff pre is a prefix of s.
val suffix : suf:string ->string -> bool
suffix ~suf s returns true iff suf is a suffix of s.
since 0.7
val chop_prefix : pre:string ->string ->string option
chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.
since 0.17
val chop_suffix : suf:string ->string ->string option
chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.
since 0.17
val take : int ->string -> string
take n s keeps only the n first chars of s.
since 0.17
val drop : int ->string -> string
drop n s removes the n first chars of s.
since 0.17
val take_drop : int ->string -> string * string
take_drop n s is take n s, drop n s.
since 0.17
val lines : string ->string list
lines s returns a list of the lines of s (splits along '\n').
unlines_iter iter concatenates all strings of iter, separated with '\n'.
since 3.2
val unlines_seq : string Stdlib.Seq.t-> string
unlines_seq seq concatenates all strings of seq, separated with '\n'.
since 3.2
val set : string ->int ->char -> string
set s i c creates a new string which is a copy of s, except for index i, which becomes c.
raisesInvalid_argument
if i is an invalid index.
since 0.12
val iter : (char -> unit)->string -> unit
iter f s applies function f on each character of s. Alias to String.iter.
since 0.12
val filter_map : (char ->char option)->string -> string
filter_map f s calls (f a0) (f a1) … (f an) where a0 … an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).
since 0.17
val filter : (char -> bool)->string -> string
filter f s discards characters of s not satisfying f.
since 0.17
val uniq : (char ->char -> bool)->string -> string
uniq eq s remove consecutive duplicate characters in s.
since 3.4
val flat_map : ?sep:string ->(char -> string)->string -> string
flat_map ~sep f s maps each chars of s to a string, then concatenates them all.
parametersep
optional separator between each generated string.
since 0.12
val for_all : (char -> bool)->string -> bool
for_all f s is true iff all characters of s satisfy the predicate f.
since 0.12
val exists : (char -> bool)->string -> bool
exists f s is true iff some character of s satisfy the predicate f.
split_on_char by s splits the string s along the given char by.
since 1.2
val split : by:string ->string ->string list
split ~by s splits the string s along the given string by. Alias to Split.list_cpy.
since 1.2
Utils
val compare_versions : string ->string -> int
compare_versions s1 s2 compares version stringss1 and s2, considering that numbers are above text.
since 0.13
val compare_natural : string ->string -> int
compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order
since 1.3
val edit_distance : ?cutoff:int ->string ->string -> int
edit_distance ~cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.
parametercutoff
if provided, it's a cap on the number of iterations. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 without (use edit_distance s1 s2 ~cutoff:3 <= 2). note that contrary to what was previously documented here, the result can still be higher than cutoff if it's reached in <cutoff iterations. However if the result is < cutoff then it is accurate.
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Find/index.html b/dev/containers/CCStringLabels/Find/index.html
index b7ec9002..d9ba07e6 100644
--- a/dev/containers/CCStringLabels/Find/index.html
+++ b/dev/containers/CCStringLabels/Find/index.html
@@ -1,2 +1,2 @@
-Find (containers.CCStringLabels.Find)
val find : ?start:int ->pattern:[ `Direct ]pattern->string -> int
find ?start ~pattern s searches for pattern in the string s, left-to-right.
returns
the offset of the first match, -1 otherwise.
parameterstart
offset in string at which we start.
val rfind : ?start:int ->pattern:[ `Reverse ]pattern->string -> int
rfind ?start ~pattern s searches for pattern in the string s, right-to-left.
returns
the offset of the start of the first match from the right, -1 otherwise.
parameterstart
right-offset in string at which we start.
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Infix/index.html b/dev/containers/CCStringLabels/Infix/index.html
index 1cf4440f..ec3cb54a 100644
--- a/dev/containers/CCStringLabels/Infix/index.html
+++ b/dev/containers/CCStringLabels/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCStringLabels.Infix)
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Split/index.html b/dev/containers/CCStringLabels/Split/index.html
index 9c35b673..35e0ebbc 100644
--- a/dev/containers/CCStringLabels/Split/index.html
+++ b/dev/containers/CCStringLabels/Split/index.html
@@ -1,2 +1,2 @@
-Split (containers.CCStringLabels.Split)
Module CCStringLabels.Split
type drop_if_empty = {
first : bool;
last : bool;
}
Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".
{first=false; last=false} will return ""; "a"; "b"; ""
{first=true; last=false} will return "a"; "b" ""
{first=false; last=true} will return ""; "a"; "b"
{first=true; last=true} will return "a"; "b"
The default value of all remaining functions is Drop_none.
no_drop does not drop any group, even empty and on borders.
since
1.5
val list_ : ?drop:drop_if_empty->by:string-> string ->(string * int * int) list
list_ ?drop ~by s splits the given string s along the given separator by. Should only be used with very small separators, otherwise use Containers_string.KMP.
returns
a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.
raises Failure
if by = "".
val gen : ?drop:drop_if_empty->by:string-> string ->(string * int * int)gen
gen ?drop ~by s splits the given string s along the given separator by. Returns a gen of slices.
val iter : ?drop:drop_if_empty->by:string-> string ->(string * int * int)iter
iter ?drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
since
2.8
val seq : ?drop:drop_if_empty->by:string-> string ->(string * int * int) Stdlib.Seq.t
seq ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.
since
3.0
Copying functions
Those split functions actually copy the substrings, which can be more convenient but less efficient in general.
val list_cpy : ?drop:drop_if_empty->by:string-> string ->string list
list_cpy ?drop ~by s splits the given string s along the given separator by. Returns a list of strings.
val gen_cpy : ?drop:drop_if_empty->by:string-> string ->string gen
gen_cpy ?drop ~by s splits the given string s along the given separator by. Returns a gen of strings.
val iter_cpy : ?drop:drop_if_empty->by:string-> string ->string iter
iter_cpy ?drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
since
2.8
val seq_cpy : ?drop:drop_if_empty->by:string-> string ->string Stdlib.Seq.t
seq_cpy ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.
since
3.0
val left : by:string-> string ->(string * string) option
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
since
0.12
val left_exn : by:string-> string -> string * string
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
raises Not_found
if by is not part of the string s.
since
0.16
val right : by:string-> string ->(string * string) option
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
since
0.12
val right_exn : by:string-> string -> string * string
right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.
raises Not_found
if by is not part of the string s.
since
0.16
\ No newline at end of file
+Split (containers.CCStringLabels.Split)
Module CCStringLabels.Split
type drop_if_empty = {
first : bool;
last : bool;
}
Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".
{first=false; last=false} will return ""; "a"; "b"; ""
{first=true; last=false} will return "a"; "b" ""
{first=false; last=true} will return ""; "a"; "b"
{first=true; last=true} will return "a"; "b"
The default value of all remaining functions is Drop_none.
no_drop does not drop any group, even empty and on borders.
since 1.5
val list_ : ?drop:drop_if_empty->by:string ->string ->(string * int * int) list
list_ ?drop ~by s splits the given string s along the given separator by. Should only be used with very small separators, otherwise use Containers_string.KMP.
returns
a list of slices (s,index,length) that are separated by by. String.sub can then be used to actually extract a string from the slice.
raisesFailure
if by = "".
val gen : ?drop:drop_if_empty->by:string ->string ->(string * int * int)gen
gen ?drop ~by s splits the given string s along the given separator by. Returns a gen of slices.
val iter : ?drop:drop_if_empty->by:string ->string ->(string * int * int)iter
iter ?drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
since 2.8
val seq : ?drop:drop_if_empty->by:string ->string ->(string * int * int)Stdlib.Seq.t
seq ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of slices. Renamed from std_seq since 3.0.
since 3.0
Copying functions
Those split functions actually copy the substrings, which can be more convenient but less efficient in general.
val list_cpy : ?drop:drop_if_empty->by:string ->string ->string list
list_cpy ?drop ~by s splits the given string s along the given separator by. Returns a list of strings.
val gen_cpy : ?drop:drop_if_empty->by:string ->string ->string gen
gen_cpy ?drop ~by s splits the given string s along the given separator by. Returns a gen of strings.
val iter_cpy : ?drop:drop_if_empty->by:string ->string ->string iter
iter_cpy ?drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
since 2.8
val seq_cpy : ?drop:drop_if_empty->by:string ->string ->string Stdlib.Seq.t
seq_cpy ?drop ~by s splits the given string s along the given separator by. Returns a Seq.t of strings. Renamed from std_seq_cpy since 3.0.
since 3.0
val left : by:string ->string ->(string * string) option
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
since 0.12
val left_exn : by:string ->string -> string * string
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
raisesNot_found
if by is not part of the string s.
since 0.16
val right : by:string ->string ->(string * string) option
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
since 0.12
val right_exn : by:string ->string -> string * string
right_exn ~by s splits on the first occurrence of by from the rightmost part of the string s.
raisesNot_found
if by is not part of the string s.
since 0.16
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/index.html b/dev/containers/CCStringLabels/index.html
index ad930c11..3e42645b 100644
--- a/dev/containers/CCStringLabels/index.html
+++ b/dev/containers/CCStringLabels/index.html
@@ -1,2 +1,4 @@
-CCStringLabels (containers.CCStringLabels)
length s returns the length (number of characters) of the given string s.
val blit : src:t->src_pos:int->dst:Stdlib.Bytes.t->dst_pos:int->len:int-> unit
blit ~src ~src_pos ~dst ~dst_pos ~len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.
replace ?which ~sub ~by s replaces some occurrences of sub by by in s.
parameter which
decides whether the occurrences to replace are:
`Left first occurrence from the left (beginning).
`Right first occurrence from the right (end).
`All all occurrences (default).
raises Invalid_argument
if sub = "".
since
0.14
val is_sub : sub:string->sub_pos:int-> string ->pos:int->sub_len:int-> bool
is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.
val repeat : string -> int -> string
repeat s n creates a string by repeating the string sn times.
val prefix : pre:string-> string -> bool
prefix ~pre s returns true iff pre is a prefix of s.
val suffix : suf:string-> string -> bool
suffix ~suf s returns true iff suf is a suffix of s.
since
0.7
val chop_prefix : pre:string-> string ->string option
chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.
since
0.17
val chop_suffix : suf:string-> string ->string option
chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.
since
0.17
val take : int -> string -> string
take n s keeps only the n first chars of s.
since
0.17
val drop : int -> string -> string
drop n s removes the n first chars of s.
since
0.17
val take_drop : int -> string -> string * string
take_drop n s is take n s, drop n s.
since
0.17
val lines : string ->string list
lines s returns a list of the lines of s (splits along '\n').
unlines_iter iter concatenates all strings of iter, separated with '\n'.
since
3.2
val unlines_seq : string Stdlib.Seq.t-> string
unlines_seq seq concatenates all strings of seq, separated with '\n'.
since
3.2
val set : string -> int -> char -> string
set s i c creates a new string which is a copy of s, except for index i, which becomes c.
raises Invalid_argument
if i is an invalid index.
since
0.12
val iter : f:(char -> unit)-> string -> unit
iter ~f s applies function f on each character of s. Alias to String.iter.
since
0.12
val filter_map : f:(char ->char option)-> string -> string
filter_map ~f s calls (f a0) (f a1) … (f an) where a0 … an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).
since
0.17
val filter : f:(char -> bool)-> string -> string
filter ~f s discards characters of s not satisfying f.
val split_on_char : by:char-> string ->string list
split_on_char ~by s splits the string s along the given char by.
since
1.2
val split : by:string-> string ->string list
split ~by s splits the string s along the given string by. Alias to Split.list_cpy.
since
1.2
Utils
val compare_versions : string -> string -> int
compare_versions s1 s2 compares version stringss1 and s2, considering that numbers are above text.
since
0.13
val compare_natural : string -> string -> int
compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order
since
1.3
val edit_distance : ?cutoff:int-> string -> string -> int
edit_distance ?cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.
parameter cutoff
if provided, it's a cap on both the number of iterations, and on the result. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 (use cutoff of 3).
length s returns the length (number of characters) of the given string s.
val blit : src:t->src_pos:int ->dst:Stdlib.Bytes.t ->dst_pos:int ->len:int -> unit
blit ~src ~src_pos ~dst ~dst_pos ~len copies len characters from string src starting at character indice src_pos, to the Bytes sequence dst starting at character indice dst_pos. Like String.blit. Compatible with the -safe-string option.
replace ?which ~sub ~by s replaces some occurrences of sub by by in s.
parameterwhich
decides whether the occurrences to replace are:
`Left first occurrence from the left (beginning).
`Right first occurrence from the right (end).
`All all occurrences (default).
raisesInvalid_argument
if sub = "".
since 0.14
val is_sub : sub:string ->sub_pos:int ->string ->pos:int ->sub_len:int -> bool
is_sub ~sub ~sub_pos s ~pos ~sub_len returns true iff the substring of sub starting at position sub_pos and of length sub_len is a substring of s starting at position pos.
val repeat : string ->int -> string
repeat s n creates a string by repeating the string sn times.
val prefix : pre:string ->string -> bool
prefix ~pre s returns true iff pre is a prefix of s.
val suffix : suf:string ->string -> bool
suffix ~suf s returns true iff suf is a suffix of s.
since 0.7
val chop_prefix : pre:string ->string ->string option
chop_prefix ~pre s removes pre from s if pre really is a prefix of s, returns None otherwise.
since 0.17
val chop_suffix : suf:string ->string ->string option
chop_suffix ~suf s removes suf from s if suf really is a suffix of s, returns None otherwise.
since 0.17
val take : int ->string -> string
take n s keeps only the n first chars of s.
since 0.17
val drop : int ->string -> string
drop n s removes the n first chars of s.
since 0.17
val take_drop : int ->string -> string * string
take_drop n s is take n s, drop n s.
since 0.17
val lines : string ->string list
lines s returns a list of the lines of s (splits along '\n').
unlines_iter iter concatenates all strings of iter, separated with '\n'.
since 3.2
val unlines_seq : string Stdlib.Seq.t-> string
unlines_seq seq concatenates all strings of seq, separated with '\n'.
since 3.2
val set : string ->int ->char -> string
set s i c creates a new string which is a copy of s, except for index i, which becomes c.
raisesInvalid_argument
if i is an invalid index.
since 0.12
val iter : f:(char -> unit)->string -> unit
iter ~f s applies function f on each character of s. Alias to String.iter.
since 0.12
val filter_map : f:(char ->char option)->string -> string
filter_map ~f s calls (f a0) (f a1) … (f an) where a0 … an are the characters of s. It returns the string of characters ci such as f ai = Some ci (when f returns None, the corresponding element of s is discarded).
since 0.17
val filter : f:(char -> bool)->string -> string
filter ~f s discards characters of s not satisfying f.
since 0.17
val uniq : eq:(char ->char -> bool)->string -> string
uniq ~eq s remove consecutive duplicate characters in s.
since 3.4
val flat_map : ?sep:string ->f:(char -> string)->string -> string
flat_map ?sep ~f s maps each chars of s to a string, then concatenates them all.
parametersep
optional separator between each generated string.
since 0.12
val for_all : f:(char -> bool)->string -> bool
for_all ~f s is true iff all characters of s satisfy the predicate f.
since 0.12
val exists : f:(char -> bool)->string -> bool
exists ~f s is true iff some character of s satisfy the predicate f.
val split_on_char : by:char ->string ->string list
split_on_char ~by s splits the string s along the given char by.
since 1.2
val split : by:string ->string ->string list
split ~by s splits the string s along the given string by. Alias to Split.list_cpy.
since 1.2
Utils
val compare_versions : string ->string -> int
compare_versions s1 s2 compares version stringss1 and s2, considering that numbers are above text.
since 0.13
val compare_natural : string ->string -> int
compare_natural s1 s2 is the Natural Sort Order, comparing chunks of digits as natural numbers. https://en.wikipedia.org/wiki/Natural_sort_order
since 1.3
val edit_distance : ?cutoff:int ->string ->string -> int
edit_distance ?cutoff s1 s2 is the edition distance between the two strings s1 and s2. This satisfies the classical distance axioms: it is always positive, symmetric, and satisfies the formula distance s1 s2 + distance s2 s3 >= distance s1 s3.
parametercutoff
if provided, it's a cap on both the number of iterations, and on the result. (since 3.0). This is useful if you just want to check whether the edit distance is less or equal than 2 (use cutoff of 3).
\ No newline at end of file
diff --git a/dev/containers/CCUnix/Infix/index.html b/dev/containers/CCUnix/Infix/index.html
index 873b7d74..be9327f6 100644
--- a/dev/containers/CCUnix/Infix/index.html
+++ b/dev/containers/CCUnix/Infix/index.html
@@ -1,2 +1,2 @@
-Infix (containers.CCUnix.Infix)
Module CCUnix.Infix
val (?|) : ('a, Stdlib.Buffer.t, unit, call_result) Stdlib.format4->'a
\ No newline at end of file
diff --git a/dev/containers/CCUnix/index.html b/dev/containers/CCUnix/index.html
index 2ce80524..50b2cf04 100644
--- a/dev/containers/CCUnix/index.html
+++ b/dev/containers/CCUnix/index.html
@@ -1,2 +1,8 @@
-CCUnix (containers.CCUnix)
Module CCUnix
High-level Functions on top of Unix
Some useful functions built on top of Unix.
status: unstable
since
0.10
type'a or_error = ('a, string) Stdlib.result
type'a gen = unit ->'a option
Calling Commands
val escape_str : string -> string
Escape a string so it can be a shell argument.
type call_result = < stdout : string; stderr : string; status : Unix.process_status; errcode : int; >
val call_full : ?bufsize:int->?stdin:[ `Gen of string gen| `Str of string ]->?env:string array->('a, Stdlib.Buffer.t, unit, call_result) Stdlib.format4->'a
call_full cmd wraps the result of Unix.open_process_full cmd into an object. It reads the full stdout and stderr of the subprocess before returning.
parameter stdin
if provided, the generator or string is consumed and fed to the subprocess input channel, which is then closed.
parameter bufsize
buffer size used to read stdout and stderr.
parameter env
environment to run the command in.
val call : ?bufsize:int->?stdin:[ `Gen of string gen| `Str of string ]->?env:string array->('a, Stdlib.Buffer.t, unit, string * string * int) Stdlib.format4->'a
call cmd is similar to call_full cmd but returns a tuple stdout, stderr, errcode instead of an object.
val call_stdout : ?bufsize:int->?stdin:[ `Gen of string gen| `Str of string ]->?env:string array->('a, Stdlib.Buffer.t, unit, string) Stdlib.format4->'a
A subprocess for interactive usage (read/write channels line by line)
since
0.11
val async_call : ?env:string array->('a, Stdlib.Buffer.t, unit, async_call_result) Stdlib.format4->'a
Spawns a subprocess, like call, but the subprocess's channels are line generators and line sinks (for stdin). If p is async_call "cmd", then p#wait waits for the subprocess to die. Channels can be closed independently.
since
0.11
Accessors
since
0.11
val stdout : < stdout : 'a; .. > ->'a
val stderr : < stderr : 'a; .. > ->'a
val status : < status : 'a; .. > ->'a
val errcode : < errcode : 'a; .. > ->'a
Simple IO
val with_in : ?mode:int->?flags:Unix.open_flag list-> string ->f:(Stdlib.in_channel ->'a)->'a
Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.
parameter flags
opening flags. Unix.O_RDONLY is used in any cases.
since
0.16
val with_out : ?mode:int->?flags:Unix.open_flag list-> string ->f:(Stdlib.out_channel ->'a)->'a
val with_process_out : string ->f:(Stdlib.out_channel ->'a)->'a
Open a shell command in a subprocess and obtain a handle to its stdin.
since
0.16
type process_full = < stdin : Stdlib.out_channel; stdout : Stdlib.in_channel; stderr : Stdlib.in_channel; close : Unix.process_status; >
Handle to a subprocess.
since
0.16
val with_process_full : ?env:string array-> string ->f:(process_full->'a)->'a
Open a subprocess and obtain a handle to its channels.
parameter env
environment to pass to the subprocess.
since
0.16
val ensure_session_leader : unit -> unit
On unix, call Unix.setsid() to make sure subprocesses die at the same time as the current process. Does nothing on windows. Idempotent: it can be called several times but will only have effects, if any, the first time.
since
2.8
Networking
val with_connection : Unix.sockaddr ->f:(Stdlib.in_channel -> Stdlib.out_channel ->'a)->'a
Wrap Unix.open_connection with a handler.
since
0.16
exceptionExitServer
val establish_server : Unix.sockaddr ->f:(Stdlib.in_channel -> Stdlib.out_channel ->_)-> unit
Listen on the address and calls the handler in a blocking fashion. Using Thread is recommended if handlers might take time. The callback should raise ExitServer to stop the loop.
with_file_lock ~kind filename f puts a lock on the offset 0 of the file named filename, calls f and returns its result after the file is unlocked. If f () raises an exception the exception is re-raised after the file is unlocked.
parameter kind
specifies whether the lock is read-only or read-write.
val with_temp_dir : ?mode:int->?dir:string-> string ->(string ->'a)->'a
Create a temporary directory, call the function, and then destroy the directory afterwards. Usage with_temp_dir pattern f.
parameter pattern
the naming pattern for the temporary directory. Helps avoiding collisions.
parameter mode
mode for the directory
parameter dir
the directory under which to make a temporary directory (default /tmp)
Note that this is implemented following the discussion at: https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/
since
2.8
\ No newline at end of file
+CCUnix (containers.CCUnix)
Module CCUnix
High-level Functions on top of Unix
Some useful functions built on top of Unix.
status: unstable
since 0.10
type'a or_error = ('a, string)Stdlib.result
type'a gen = unit ->'a option
Calling Commands
val escape_str : string -> string
Escape a string so it can be a shell argument.
type call_result = < stdout : string; stderr : string; status : Unix.process_status; errcode : int; >
val call_full : ?bufsize:int ->?stdin:[ `Gen of string gen| `Str of string ]->
+?env:string array->('a, Stdlib.Buffer.t, unit, call_result)Stdlib.format4->'a
call_full cmd wraps the result of Unix.open_process_full cmd into an object. It reads the full stdout and stderr of the subprocess before returning.
parameterstdin
if provided, the generator or string is consumed and fed to the subprocess input channel, which is then closed.
parameterbufsize
buffer size used to read stdout and stderr.
parameterenv
environment to run the command in.
val call : ?bufsize:int ->?stdin:[ `Gen of string gen| `Str of string ]->
+?env:string array->
+('a, Stdlib.Buffer.t, unit, string * string * int)Stdlib.format4->'a
call cmd is similar to call_full cmd but returns a tuple stdout, stderr, errcode instead of an object.
val call_stdout : ?bufsize:int ->?stdin:[ `Gen of string gen| `Str of string ]->
+?env:string array->('a, Stdlib.Buffer.t, unit, string)Stdlib.format4->'a
A subprocess for interactive usage (read/write channels line by line)
since 0.11
val async_call : ?env:string array->('a, Stdlib.Buffer.t, unit, async_call_result)Stdlib.format4->'a
Spawns a subprocess, like call, but the subprocess's channels are line generators and line sinks (for stdin). If p is async_call "cmd", then p#wait waits for the subprocess to die. Channels can be closed independently.
since 0.11
Accessors
since 0.11
val stdout : < stdout : 'a; .. >->'a
val stderr : < stderr : 'a; .. >->'a
val status : < status : 'a; .. >->'a
val errcode : < errcode : 'a; .. >->'a
Simple IO
val with_in : ?mode:int ->?flags:Unix.open_flag list->string ->f:(Stdlib.in_channel ->'a)->
+'a
Open an input file with the given optional flag list, calls the function on the input channel. When the function raises or returns, the channel is closed.
parameterflags
opening flags. Unix.O_RDONLY is used in any cases.
since 0.16
val with_out : ?mode:int ->?flags:Unix.open_flag list->
+string ->f:(Stdlib.out_channel ->'a)->'a
val with_process_out : string ->f:(Stdlib.out_channel ->'a)->'a
Open a shell command in a subprocess and obtain a handle to its stdin.
since 0.16
type process_full = < stdin : Stdlib.out_channel; stdout : Stdlib.in_channel; stderr : Stdlib.in_channel; close : Unix.process_status; >
Handle to a subprocess.
since 0.16
val with_process_full : ?env:string array->string ->f:(process_full->'a)->'a
Open a subprocess and obtain a handle to its channels.
parameterenv
environment to pass to the subprocess.
since 0.16
val ensure_session_leader : unit -> unit
On unix, call Unix.setsid() to make sure subprocesses die at the same time as the current process. Does nothing on windows. Idempotent: it can be called several times but will only have effects, if any, the first time.
since 2.8
Networking
val with_connection : Unix.sockaddr ->f:(Stdlib.in_channel ->Stdlib.out_channel ->'a)->'a
Wrap Unix.open_connection with a handler.
since 0.16
exceptionExitServer
val establish_server : Unix.sockaddr ->f:(Stdlib.in_channel ->Stdlib.out_channel ->_)-> unit
Listen on the address and calls the handler in a blocking fashion. Using Thread is recommended if handlers might take time. The callback should raise ExitServer to stop the loop.
since 0.16
File lock
val with_file_lock : kind:[ `Read | `Write ]->string ->(unit ->'a)->'a
with_file_lock ~kind filename f puts a lock on the offset 0 of the file named filename, calls f and returns its result after the file is unlocked. If f () raises an exception the exception is re-raised after the file is unlocked.
parameterkind
specifies whether the lock is read-only or read-write.
val with_temp_dir : ?mode:int ->?dir:string ->string ->(string ->'a)->'a
Create a temporary directory, call the function, and then destroy the directory afterwards. Usage with_temp_dir pattern f.
parameterpattern
the naming pattern for the temporary directory. Helps avoiding collisions.
parametermode
mode for the directory
parameterdir
the directory under which to make a temporary directory (default /tmp)
Note that this is implemented following the discussion at: https://discuss.ocaml.org/t/how-to-create-a-temporary-directory-in-ocaml/1815/
since 2.8
\ No newline at end of file
diff --git a/dev/containers/CCUtf8_string/index.html b/dev/containers/CCUtf8_string/index.html
index ca694a65..4f24e988 100644
--- a/dev/containers/CCUtf8_string/index.html
+++ b/dev/containers/CCUtf8_string/index.html
@@ -1,2 +1,2 @@
-CCUtf8_string (containers.CCUtf8_string)
Translate the unicode codepoint to a list of utf-8 bytes. This can be used, for example, in combination with Buffer.add_char on a pre-allocated buffer to add the bytes one by one (despite its name, Buffer.add_char takes individual bytes, not unicode codepoints).
Conversion from a string without validating. CAUTION this is unsafe and can break all the other functions in this module. Use only if you're sure the string is valid UTF8. Upon iteration, if an invalid substring is met, Malformed will be raised.
\ No newline at end of file
+CCUtf8_string (containers.CCUtf8_string)
Module CCUtf8_string
Unicode String, in UTF8
A unicode string represented by a utf8 bytestring. This representation is convenient for manipulating normal OCaml strings that are encoded in UTF8.
We perform only basic decoding and encoding between codepoints and bytestrings. For more elaborate operations, please use the excellent Uutf.
Translate the unicode codepoint to a list of utf-8 bytes. This can be used, for example, in combination with Buffer.add_char on a pre-allocated buffer to add the bytes one by one (despite its name, Buffer.add_char takes individual bytes, not unicode codepoints).
Conversion from a string without validating. CAUTION this is unsafe and can break all the other functions in this module. Use only if you're sure the string is valid UTF8. Upon iteration, if an invalid substring is met, Malformed will be raised.
\ No newline at end of file
diff --git a/dev/containers/CCVector/index.html b/dev/containers/CCVector/index.html
index 0adb165f..fa7e5d4a 100644
--- a/dev/containers/CCVector/index.html
+++ b/dev/containers/CCVector/index.html
@@ -1,2 +1,3 @@
-CCVector (containers.CCVector)
Module CCVector
Growable, mutable vector
type ro = [
| `RO
]
type rw = [
| `RW
]
type('a, 'mut) t
The type of a vector of elements of type 'a, with a mutability flat 'mut.
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.
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.
remove_and_shift v i remove the i-th element from v. Move elements that are after the i-th in v. Preserve the order of the elements in v. See remove_unordered for constant time function.
remove_unordered v i remove the i-th element from v. Does NOT preserve the order of the elements in v (might swap with the last element). See remove_and_shift if you want to keep the ordering.
Access the underlying shared array (do not modify!). unsafe_get_array v is longer than size v, but elements at higher index than size v are undefined (do not access!).
Range of integers, either ascending or descending (both included, therefore the result is never empty). Example: 1 -- 10 returns the vector [1;2;3;4;5;6;7;8;9;10].
to_seq v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first. Renamed from to_std_seq since 3.0.
pp ~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 ",@ ").
Let operators on OCaml >= 4.08.0, nothing otherwise
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.
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.
remove_and_shift v i remove the i-th element from v. Move elements that are after the i-th in v. Preserve the order of the elements in v. See remove_unordered for constant time function.
remove_unordered v i remove the i-th element from v. Does NOT preserve the order of the elements in v (might swap with the last element). See remove_and_shift if you want to keep the ordering.
Access the underlying shared array (do not modify!). unsafe_get_array v is longer than size v, but elements at higher index than size v are undefined (do not access!).
Range of integers, either ascending or descending (both included, therefore the result is never empty). Example: 1 -- 10 returns the vector [1;2;3;4;5;6;7;8;9;10].
to_seq v returns the sequence of elements of v in reverse order, that is, the last elements of v are iterated on first. Renamed from to_std_seq since 3.0.
pp ~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 ",@ ").
Let operators on OCaml >= 4.08.0, nothing otherwise
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/Make/index.html b/dev/containers/Containers/Hashtbl/Make/index.html
index 21dfd4ed..9de4d3fa 100644
--- a/dev/containers/Containers/Hashtbl/Make/index.html
+++ b/dev/containers/Containers/Hashtbl/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.Containers.Hashtbl.Make)
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/MakeSeeded/index.html b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html
index 8abaf5fa..4deca93c 100644
--- a/dev/containers/Containers/Hashtbl/MakeSeeded/index.html
+++ b/dev/containers/Containers/Hashtbl/MakeSeeded/index.html
@@ -1,2 +1,2 @@
-MakeSeeded (containers.Containers.Hashtbl.MakeSeeded)
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/index.html b/dev/containers/Containers/Hashtbl/index.html
index 88b576d8..e9363b2b 100644
--- a/dev/containers/Containers/Hashtbl/index.html
+++ b/dev/containers/Containers/Hashtbl/index.html
@@ -1,2 +1,6 @@
-Hashtbl (containers.Containers.Hashtbl)
keys tbl f iterates on keys (similar order as Hashtbl.iter).
val values : ('a, 'b) Stdlib.Hashtbl.t->'bCCHashtbl.iter
values tbl f iterates on values in the table tbl.
val keys_list : ('a, 'b) Stdlib.Hashtbl.t->'a list
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since
0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since
0.8
val map_list : ('a->'b->'c)->('a, 'b) Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
since
0.16
val decr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since
0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter
Iterate on bindings in the table.
since
2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since
0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since
2.8
val add_iter_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_iter : ('a * 'b)CCHashtbl.iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order.
since
2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)CCHashtbl.iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_seq : ('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since
3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t->'aCCHashtbl.iter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t->'a Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since
3.0
val of_iter_count : 'aCCHashtbl.iter->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since
2.8
val of_seq_count : 'a Stdlib.Seq.t->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since
3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since
0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since 0.8
val values_list : ('a, 'b)Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since 0.8
val map_list : ('a->'b->'c)->('a, 'b)Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
since 0.16
val decr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since 0.16
val to_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter
Iterate on bindings in the table.
since 2.8
val add_list : ('a, 'b list)Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since 0.16
val add_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_seq : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_iter : ('a * 'b)CCHashtbl.iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order.
since 2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)CCHashtbl.iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_seq : ('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_iter_count : ('a, int)Stdlib.Hashtbl.t->'aCCHashtbl.iter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since 2.8
val add_seq_count : ('a, int)Stdlib.Hashtbl.t->'aStdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since 3.0
val of_iter_count : 'aCCHashtbl.iter->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since 2.8
val of_seq_count : 'aStdlib.Seq.t->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since 3.0
val to_list : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since 0.14
val get_or_add : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html
index 699d9ec4..9d235657 100644
--- a/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html
+++ b/dev/containers/Containers/Hashtbl/module-type-HashedType/index.html
@@ -1,2 +1,2 @@
-HashedType (containers.Containers.Hashtbl.HashedType)
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : int t->key Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : 'at->f:(key->'a option->'a option)->k:key-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since
0.13
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/module-type-S/index.html b/dev/containers/Containers/Hashtbl/module-type-S/index.html
index 31257af5..0fb4fd43 100644
--- a/dev/containers/Containers/Hashtbl/module-type-S/index.html
+++ b/dev/containers/Containers/Hashtbl/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers.Containers.Hashtbl.S)
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html
index c494faf3..b3b378c4 100644
--- a/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html
+++ b/dev/containers/Containers/Hashtbl/module-type-SeededHashedType/index.html
@@ -1,2 +1,2 @@
-SeededHashedType (containers.Containers.Hashtbl.SeededHashedType)
\ No newline at end of file
diff --git a/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html
index 8c4b27fa..2457ed88 100644
--- a/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html
+++ b/dev/containers/Containers/Hashtbl/module-type-SeededS/index.html
@@ -1,2 +1,2 @@
-SeededS (containers.Containers.Hashtbl.SeededS)
\ No newline at end of file
diff --git a/dev/containers/Containers/index.html b/dev/containers/Containers/index.html
index a1f2559b..f7e91647 100644
--- a/dev/containers/Containers/index.html
+++ b/dev/containers/Containers/index.html
@@ -1,2 +1,2 @@
-Containers (containers.Containers)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/Make/index.html b/dev/containers/ContainersLabels/Hashtbl/Make/index.html
index 8c1b3370..ba8f41af 100644
--- a/dev/containers/ContainersLabels/Hashtbl/Make/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/Make/index.html
@@ -1,2 +1,2 @@
-Make (containers.ContainersLabels.Hashtbl.Make)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html
index 31a79f71..d0dace38 100644
--- a/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/MakeSeeded/index.html
@@ -1,2 +1,2 @@
-MakeSeeded (containers.ContainersLabels.Hashtbl.MakeSeeded)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/index.html b/dev/containers/ContainersLabels/Hashtbl/index.html
index 8ab37587..114b644f 100644
--- a/dev/containers/ContainersLabels/Hashtbl/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/index.html
@@ -1,2 +1,6 @@
-Hashtbl (containers.ContainersLabels.Hashtbl)
keys tbl f iterates on keys (similar order as Hashtbl.iter).
val values : ('a, 'b) Stdlib.Hashtbl.t->'bCCHashtbl.iter
values tbl f iterates on values in the table tbl.
val keys_list : ('a, 'b) Stdlib.Hashtbl.t->'a list
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since
0.8
val values_list : ('a, 'b) Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since
0.8
val map_list : ('a->'b->'c)->('a, 'b) Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
since
0.16
val decr : ?by:int->('a, int) Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since
0.16
val to_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter
Iterate on bindings in the table.
since
2.8
val add_list : ('a, 'b list) Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since
0.16
val add_iter : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since
2.8
val add_iter_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_seq : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:('a->'b->'b->'b)->('a, 'b) Stdlib.Hashtbl.t->('a * 'b) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_iter : ('a * 'b)CCHashtbl.iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order.
since
2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)CCHashtbl.iter->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val of_seq : ('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since
3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b) Stdlib.Seq.t->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val add_iter_count : ('a, int) Stdlib.Hashtbl.t->'aCCHashtbl.iter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : ('a, int) Stdlib.Hashtbl.t->'a Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since
3.0
val of_iter_count : 'aCCHashtbl.iter->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since
2.8
val of_seq_count : 'a Stdlib.Seq.t->('a, int) Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since
3.0
val to_list : ('a, 'b) Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b) Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since
0.14
val get_or_add : ('a, 'b) Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
since 0.8
val values_list : ('a, 'b)Stdlib.Hashtbl.t->'b list
values_list tbl is the list of values in tbl.
since 0.8
val map_list : ('a->'b->'c)->('a, 'b)Stdlib.Hashtbl.t->'c list
map_list f tbl maps on a tbl's items. Collect into a list.
val incr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameterby
if specified, the int value is incremented by by rather than 1.
since 0.16
val decr : ?by:int ->('a, int)Stdlib.Hashtbl.t->'a-> unit
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
since 0.16
val to_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter
Iterate on bindings in the table.
since 2.8
val add_list : ('a, 'b list)Stdlib.Hashtbl.t->'a->'b-> unit
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
since 0.16
val add_iter : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add.
since 2.8
val add_iter_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)CCHashtbl.iter-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_seq : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since 3.0
val add_seq_with : f:('a->'b->'b->'b)->
+('a, 'b)Stdlib.Hashtbl.t->('a * 'b)Stdlib.Seq.t-> unit
Add the corresponding pairs to the table. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_iter : ('a * 'b)CCHashtbl.iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order.
since 2.8
val of_iter_with : f:('a->'b->'b->'b)->('a * 'b)CCHashtbl.iter->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val of_seq : ('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
since 3.0
val of_seq_with : f:('a->'b->'b->'b)->('a * 'b)Stdlib.Seq.t->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val add_iter_count : ('a, int)Stdlib.Hashtbl.t->'aCCHashtbl.iter-> unit
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since 2.8
val add_seq_count : ('a, int)Stdlib.Hashtbl.t->'aStdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from add_std_seq_count since 3.0.
since 3.0
val of_iter_count : 'aCCHashtbl.iter->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it.
since 2.8
val of_seq_count : 'aStdlib.Seq.t->('a, int)Stdlib.Hashtbl.t
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
since 3.0
val to_list : ('a, 'b)Stdlib.Hashtbl.t->('a * 'b) list
to_list tbl returns the list of (key,value) bindings (order unspecified).
val of_list : ('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:('a->'b->'b->'b)->('a * 'b) list->('a, 'b)Stdlib.Hashtbl.t
From the given bindings, added in order. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since 3.3
val update : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b option->'b option)->k:'a-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
since 0.14
val get_or_add : ('a, 'b)Stdlib.Hashtbl.t->f:('a->'b)->k:'a->'b
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html
index d8f421d3..9a92bfa6 100644
--- a/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/module-type-HashedType/index.html
@@ -1,2 +1,2 @@
-HashedType (containers.ContainersLabels.Hashtbl.HashedType)
incr ?by tbl x increments or initializes the counter associated with x. If get tbl x = None, then after update, get tbl x = Some 1; otherwise, if get tbl x = Some n, now get tbl x = Some (n+1).
parameter by
if specified, the int value is incremented by by rather than 1.
decr ?by tbl x is like incr but subtract 1 (or the value of by). If the value reaches 0, the key is removed from the table. This does nothing if the key is not already present in the table.
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
Add the corresponding pairs to the table, using Hashtbl.add. Renamed from add_std_seq since 3.0.
since
3.0
val add_seq_with : f:(key->'a->'a->'a)->'at->(key * 'a) Stdlib.Seq.t-> unit
Add the corresponding pairs to the table, using Hashtbl.add. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
add_iter_count tbl i increments the count of each element of i by calling incr. This is useful for counting how many times each element of i occurs.
since
2.8
val add_seq_count : int t->key Stdlib.Seq.t-> unit
add_seq_count tbl seq increments the count of each element of seq by calling incr. This is useful for counting how many times each element of seq occurs. Renamed from of_std_seq_count since 3.0.
of_list l builds a table from the given list l of bindings k_i -> v_i, added in order using add. If a key occurs several times, it will be added several times, and the visible binding will be the last one.
val of_list_with : f:(key->'a->'a->'a)->(key * 'a) list->'at
of_list l builds a table from the given list l of bindings k_i -> v_i. If a key occurs multiple times in the input, the values are combined using f in an unspecified order.
since
3.3
val update : 'at->f:(key->'a option->'a option)->k:key-> unit
update tbl ~f ~k updates key k by calling f k (Some v) if k was mapped to v, or f k None otherwise; if the call returns None then k is removed/stays removed, if the call returns Some v' then the binding k -> v' is inserted using Hashtbl.replace.
get_or_add tbl ~k ~f finds and returns the binding of k in tbl, if it exists. If it does not exist, then f k is called to obtain a new binding v; k -> v is added to tbl and v is returned.
pp ~pp_start ~pp_stop ~pp_sep ~pp arrow pp_k pp_v returns a table printer given a pp_k printer for individual key and a pp_v printer for individual value. pp_start and pp_stop control the opening and closing delimiters, by default print nothing. pp_sep control the separator between binding. pp_arrow control the arrow between the key and value. Renamed from print since 2.0.
since
0.13
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html
index 5ed2f97c..8a633f00 100644
--- a/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/module-type-S/index.html
@@ -1,2 +1,2 @@
-S (containers.ContainersLabels.Hashtbl.S)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html
index 8326de8f..b159d139 100644
--- a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededHashedType/index.html
@@ -1,2 +1,2 @@
-SeededHashedType (containers.ContainersLabels.Hashtbl.SeededHashedType)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html
index 14ca6201..8aec14a1 100644
--- a/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html
+++ b/dev/containers/ContainersLabels/Hashtbl/module-type-SeededS/index.html
@@ -1,2 +1,2 @@
-SeededS (containers.ContainersLabels.Hashtbl.SeededS)
\ No newline at end of file
diff --git a/dev/containers/ContainersLabels/index.html b/dev/containers/ContainersLabels/index.html
index 46119397..9f052ad8 100644
--- a/dev/containers/ContainersLabels/index.html
+++ b/dev/containers/ContainersLabels/index.html
@@ -1,2 +1,2 @@
-ContainersLabels (containers.ContainersLabels)
\ No newline at end of file
diff --git a/dev/containers/Containers_codegen/Bitfield/index.html b/dev/containers/Containers_codegen/Bitfield/index.html
index 60dae30e..83bca526 100644
--- a/dev/containers/Containers_codegen/Bitfield/index.html
+++ b/dev/containers/Containers_codegen/Bitfield/index.html
@@ -1,2 +1,2 @@
-Bitfield (containers.Containers_codegen.Bitfield)
Module Containers_codegen.Bitfield
Generate efficient bitfields that fit in an integer
type t
val make : ?emit_failure_if_too_wide:bool->name:string-> unit ->t
Make a new bitfield with the given name.
parameter name
the name of the generated type
parameter emit_failure_if_too_wide
if true, generated code includes a runtime assertion that Sys.int_size is wide enough to support this type
field_int ty name ~width adds a field of size width to the bitfield with name name. The accessors will be for integers of width bits, and the setter might assert that the provided integer fits.
field_int ty name ~width adds a field of size width to the bitfield with name name. The accessors will be for integers of width bits, and the setter might assert that the provided integer fits.
Generate code for the implementation for the given bitfield
\ No newline at end of file
diff --git a/dev/containers/Containers_codegen/Code/index.html b/dev/containers/Containers_codegen/Code/index.html
index 252d58bd..989a0f30 100644
--- a/dev/containers/Containers_codegen/Code/index.html
+++ b/dev/containers/Containers_codegen/Code/index.html
@@ -1,2 +1,2 @@
-Code (containers.Containers_codegen.Code)
\ No newline at end of file
diff --git a/dev/containers/Containers_codegen/index.html b/dev/containers/Containers_codegen/index.html
index 8decd554..e07a4a7f 100644
--- a/dev/containers/Containers_codegen/index.html
+++ b/dev/containers/Containers_codegen/index.html
@@ -1,5 +1,5 @@
-Containers_codegen (containers.Containers_codegen)
Module Containers_codegen
Code generators
The code generator library is designed to be used from a build system (for example, from dune) to generate efficient code for features that are harder to provide at runtime.
The idea is that the build system should invoke some OCaml script that depends on containers.codegen; the script uses the DSL below to describe what code to generate (e.g. a description of a bitfield type) and emits a .ml file (and possibly a .mli file).
The code generator library is designed to be used from a build system (for example, from dune) to generate efficient code for features that are harder to provide at runtime.
The idea is that the build system should invoke some OCaml script that depends on containers.codegen; the script uses the DSL below to describe what code to generate (e.g. a description of a bitfield type) and emits a .ml file (and possibly a .mli file).
For example, the build script might contain:
module CG = Containers_codegen
let () =
let module B = CG.Bitfield in
let b = B.make ~name:"t" () in
@@ -10,4 +10,4 @@ let () =
CG.emit_file "foo.mli" (B.gen_mli b);
CG.emit_file "foo.ml" (B.gen_ml b);
- ()
and this will produce foo.ml and foo.mli with a bitfield containing x, y, and z.
\ No newline at end of file
diff --git a/dev/containers/Containers_top/index.html b/dev/containers/Containers_top/index.html
index bb4833b0..7495059d 100644
--- a/dev/containers/Containers_top/index.html
+++ b/dev/containers/Containers_top/index.html
@@ -1,2 +1,2 @@
-Containers_top (containers.Containers_top)
Module Containers_top
type'a printer = Stdlib.Format.formatter ->'a-> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list-> unit
\ No newline at end of file
+Containers_top (containers.Containers_top)
Module Containers_top
type'a printer = Stdlib.Format.formatter ->'a-> unit
val eval_exn : string -> bool
val install_printer : string -> unit
val install_printers : string list-> unit
\ No newline at end of file
diff --git a/dev/containers/index.html b/dev/containers/index.html
index 88b8c7a8..de9cd4d8 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:
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
diff --git a/dev/index.html b/dev/index.html
index e749c4fd..301844c1 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -11,9 +11,9 @@