diff --git a/dev/containers-data/CCBijection/Make/argument-1-L/index.html b/dev/containers-data/CCBijection/Make/argument-1-L/index.html deleted file mode 100644 index f52229b6..00000000 --- a/dev/containers-data/CCBijection/Make/argument-1-L/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -
Make.1-LMake.2-RCCBijection.Makemodule L : OrderedTypemodule R : OrderedTypetype left = L.ttype right = R.tval empty : tval is_empty : t -> boolAdd left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.
val cardinal : t -> intNumber of bindings. O(n) time.
Remove the left, right binding if it exists. Return the same bijection otherwise.
Remove the binding with left key if it exists. Return the same bijection otherwise.
Remove the binding with right key if it exists. Return the same bijection otherwise.
CCBijection.OrderedTypeCCBijection.Sval empty : tval is_empty : t -> boolAdd left and right correspondence to bijection such that left and right are unique in their respective sets and only correspond to each other.
val cardinal : t -> intNumber of bindings. O(n) time.
Remove the left, right binding if it exists. Return the same bijection otherwise.
Remove the binding with left key if it exists. Return the same bijection otherwise.
Remove the binding with right key if it exists. Return the same bijection otherwise.
Make.1-_CCBitField.MakeCreate a new bitfield type
module _ : sig ... endGenerative type of bitfields. Each instantiation of the functor should create a new, incompatible type
val empty : tEmpty bitfields (all bits 0).
val mk_field : unit -> fieldMake a new field.
Prevent new fields from being added. From now on, creating a field will raise Frozen.
CCBitField.SGenerative type of bitfields. Each instantiation of the functor should create a new, incompatible type
val empty : tEmpty bitfields (all bits 0).
val mk_field : unit -> fieldMake a new field.
Prevent new fields from being added. From now on, creating a field will raise Frozen.
CCGraph.Dottype attribute = [ | `Color of string |
| `Shape of string |
| `Weight of int |
| `Style of string |
| `Label of string |
| `Other of string * string |
]Dot attribute
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 ->
- unitPrint the graph, starting from given vertex, on the formatter.
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 ->
- 'v iter ->
- unitSame as pp but starting from several vertices, not just one.
CCGraph.Itertype 'a t = 'a iterval return : 'a -> 'a tval iter : ( 'a -> unit ) -> 'a t -> unitval fold : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bval to_list : 'a t -> 'a listCCGraph.Lazy_treeval fold_v : ( 'acc -> 'v -> 'acc ) -> 'acc -> ( 'v, _ ) t -> 'accCCGraph.Mapval empty : 'a tRemove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.
Traverse.Eventtype ('v, 'e) t = [ | `Enter of 'v * int * ( 'v, 'e ) path |
| `Exit of 'v |
| `Edge of 'v * 'e * 'v * edge_kind |
]A traversal is a sequence of such events
val get_vertex : ( 'v, 'e ) t -> ('v * [ `Enter | `Exit ]) optionval get_enter : ( 'v, 'e ) t -> 'v optionval get_exit : ( 'v, 'e ) t -> 'v optionval get_edge : ( 'v, 'e ) t -> ('v * 'e * 'v) optionCCGraph.TraverseTraversal 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 generic_tag :
- tags:'v tag_set ->
- bag:'v bag ->
- graph:( 'v, 'e ) t ->
- 'v iter ->
- 'v iter_onceOne-shot traversal of the graph using a tag set and the given bag.
val dijkstra :
- tbl:'v set ->
- ?dist:( 'e -> int ) ->
- graph:( 'v, 'e ) t ->
- 'v iter ->
- ('v * int * ( 'v, 'e ) path) iter_onceDijkstra 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).
module Event : sig ... endCCGraph.MAPval empty : 'a tRemove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.
Make.1-ECCHashSet.Maketype elt = E.tval create : int -> tcreate n makes a new set with the given capacity n.
val clear : t -> unitclear s removes all elements from s.
val cardinal : t -> intcardinal s returns the number of elements in s.
CCHashSet.ELEMENTCCHashSet.Sval create : int -> tcreate n makes a new set with the given capacity n.
val clear : t -> unitclear s removes all elements from s.
val cardinal : t -> intcardinal s returns the number of elements in s.
Make.1-KCCHashTrie.Maketype key = K.tval empty : 'a tval is_empty : _ t -> boolupdate k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a tadd_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 remove_mut : id:Transient.t -> key -> 'a t -> 'a tSame as remove, but modifies in place whenever possible.
val update_mut :
- id:Transient.t ->
- key ->
- f:( 'a option -> 'a option ) ->
- 'a t ->
- 'a tSame as update but with mutability.
val cardinal : _ t -> intval add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a tval add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a tval add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a tCCHashTrie.TransientIdentifiers 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.
val create : unit -> tCreate a new, active ID.
val frozen : t -> boolfrozen i returns true if freeze i was called before. In this case, the ID cannot be used for modifications again.
val active : t -> boolactive i is not (frozen i).
val freeze : t -> unitfreeze i makes i unusable for new modifications. The values created with i will now be immutable.
val with_ : ( t -> 'a ) -> 'awith_ f creates a transient ID i, calls f i, freezes the ID i and returns the result of f i.
CCHashTrie.KEYCCHashTrie.Sval empty : 'a tval is_empty : _ t -> boolupdate k ~f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a tadd_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 remove_mut : id:Transient.t -> key -> 'a t -> 'a tSame as remove, but modifies in place whenever possible.
val update_mut :
- id:Transient.t ->
- key ->
- f:( 'a option -> 'a option ) ->
- 'a t ->
- 'a tSame as update but with mutability.
val cardinal : _ t -> intval add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a tval add_iter_mut : id:Transient.t -> 'a t -> (key * 'a) iter -> 'a tval add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a tCCHet.Keyval create : unit -> 'a tCCHet.MapCCHet.TblCCKTree.Dottype attribute = [ | `Color of string | |
| `Shape of string | |
| `Weight of int | |
| `Style of string | |
| `Label of string | |
| `Id of string | (* Unique ID in the graph. Allows sharing. *) |
| `Other of string * string |
]Dot attributes for nodes
A dot graph is a name, plus a list of trees labelled with attributes
val mk_id : ( 'a, Stdlib.Buffer.t, unit, attribute ) Stdlib.format4 -> 'aUsing a formatter string, build an ID.
val mk_label : ( 'a, Stdlib.Buffer.t, unit, attribute ) Stdlib.format4 -> 'aUsing a formatter string, build a label.
val print_to_file : string -> graph -> unitprint_to_file filename g prints g into a file whose name is filename.
CCKTree.psetAbstract Set structure
method add : 'a -> 'a psetCCLazy_list.InfixMake.1-XCCMixmap.Maketype key = X.tA map containing values of different types, indexed by key.
val empty : tEmpty map.
Get the value corresponding to this key, if it exists and belongs to the same key.
Find the value for the given key, which must be of the right type.
val cardinal : t -> intNumber of bindings.
All the bindings that come from the corresponding injection.
CCMixmap.ORDCCMixmap.SA map containing values of different types, indexed by key.
val empty : tEmpty map.
Get the value corresponding to this key, if it exists and belongs to the same key.
Find the value for the given key, which must be of the right type.
val cardinal : t -> intNumber of bindings.
All the bindings that come from the corresponding injection.
Make.1-KMake.2-VCCMultiMap.Makemodule K : OrderedTypemodule V : OrderedTypetype key = K.ttype value = V.tval empty : tEmpty multimap.
val is_empty : t -> boolEmpty multimap?
val size : t -> intNumber of keys.
MakeBidir.1-LMakeBidir.2-RCCMultiMap.MakeBidirmodule L : OrderedTypemodule R : OrderedTypetype left = L.ttype right = R.tval empty : tval is_empty : t -> boolval cardinal_left : t -> intNumber of distinct left keys.
val cardinal_right : t -> intNumber of distinct right keys.
Like find_right but returns at most one value.
CCMultiMap.BIDIRval empty : tval is_empty : t -> boolval cardinal_left : t -> intNumber of distinct left keys.
val cardinal_right : t -> intNumber of distinct right keys.
Like find_right but returns at most one value.
CCMultiMap.OrderedTypeCCMultiMap.Sval empty : tEmpty multimap.
val is_empty : t -> boolEmpty multimap?
val size : t -> intNumber of keys.
CCMultiSet.Makeval empty : tval is_empty : t -> boolremove_mult set x n removes at most n occurrences of x from set.
update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.
union a b contains as many occurrences of an element x as count a x + count b x.
meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).
intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).
val cardinal : t -> intNumber of distinct elements.
CCMultiSet.Sval empty : tval is_empty : t -> boolremove_mult set x n removes at most n occurrences of x from set.
update set x f calls f n where n is the current multiplicity of x in set (0 to indicate its absence); the result of f n is the new multiplicity of x.
union a b contains as many occurrences of an element x as count a x + count b x.
meet a b is a multiset such that count (meet a b) x = max (count a x) (count b x).
intersection a b is a multiset such that count (intersection a b) x = min (count a x) (count b x).
val cardinal : t -> intNumber of distinct elements.
Make.1-Xval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCMutHeap.Maketype elt = X.tType of elements
val create : unit -> tCreate a heap
val in_heap : elt -> boolval size : t -> intNumber of integers within the heap
val is_empty : t -> boolval clear : t -> unitClear the content of the heap
CCMutHeap_intf.RANKEDval idx : t -> intIndex in heap. return -1 if never set
val set_idx : t -> int -> unitUpdate index in heap
CCMutHeap_intf.Sval create : unit -> tCreate a heap
val in_heap : elt -> boolval size : t -> intNumber of integers within the heap
val is_empty : t -> boolval clear : t -> unitClear the content of the heap
Make.1-HCCPersistentHashtbl.Makemodule H : HashedTypetype key = H.tval empty : unit -> 'a tEmpty table. The table will be allocated at the first binding.
val create : int -> 'a tCreate a new hashtable, with the given initial capacity.
val is_empty : 'a t -> boolIs the table empty?
val length : _ t -> intNumber of bindings.
Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
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 ) ->
- 'a t ->
- 'b t ->
- 'c tMerge 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.
val stats : _ t -> Stdlib.Hashtbl.statisticsStatistics on the internal table.
CCPersistentHashtbl.HashedTypeCCPersistentHashtbl.Sval empty : unit -> 'a tEmpty table. The table will be allocated at the first binding.
val create : int -> 'a tCreate a new hashtable, with the given initial capacity.
val is_empty : 'a t -> boolIs the table empty?
val length : _ t -> intNumber of bindings.
Add the binding to the table, returning a new table. The old binding for this key, if it exists, is shadowed and will be restored upon remove tbl k.
Add the binding to the table, returning a new table. This erases the current binding for key, if any.
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 ) ->
- 'a t ->
- 'b t ->
- 'c tMerge 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.
val stats : _ t -> Stdlib.Hashtbl.statisticsStatistics on the internal table.
CCRAL.Infixval (--^) : int -> int -> int ta --^ b is the integer range from a to b, where b is excluded.
Array.ByteEfficient array version for the char type
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
Make.1-Eltval dummy : tArray.MakeMakes an array given an arbitrary element type
module Elt : sig ... endtype elt = Elt.tThe element type
type t = Elt.t arrayThe type of an array instance
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.ArrayThe abstract type for arrays
module type S = sig ... endEfficient array version for the char type
Array.Sval dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.ByteAn efficient byte based ring buffer
module Array = Array.ByteThe module type of Array for this ring buffer
val create : int -> tcreate 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.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
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.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
Make.ArrayThe module type of Array for this ring buffer
type elt = X.tThe element type
type t = X.t arrayThe type of an array instance
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
Make.1-Xval dummy : tCCRingBuffer.MakeBuffer using regular arrays
module X : sig ... endThe module type of Array for this ring buffer
val create : int -> tcreate 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.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
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.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
MakeFromArray.1-Aval dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.MakeFromArrayMakes a ring buffer module with the given array type
module Array = AThe module type of Array for this ring buffer
val create : int -> tcreate 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.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
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.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
S.ArrayThe module type of Array for this ring buffer
val dummy : eltA dummy element used for empty slots in the array
val create : int -> tMake an array of the given size, filled with dummy elements.
val length : t -> intlength t gets the total number of elements currently in t.
blit t s arr i len copies len elements from arr starting at i to position s from t.
CCRingBuffer.SThe abstract ring buffer type, made concrete by choice of ARRAY module implementation
val create : int -> tcreate 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.
val capacity : t -> intLength of the inner buffer.
val length : t -> intNumber of elements currently stored in the buffer.
val is_full : t -> booltrue if pushing an element would erase another element.
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.
blit_into buf to_buf o len copies at most len elements from buf into to_buf starting at offset o in s.
append b ~into copies all data from b and adds it at the end of into. Erases data of into if there is not enough room.
val clear : t -> unitClear the content of the buffer
val is_empty : t -> boolIs the buffer empty (i.e. contains no elements)?
val junk_front : t -> unitDrop the front element from t.
val junk_back : t -> unitDrop the back element from t.
val skip : t -> int -> unitskip b len removes len elements from the front of b.
iteri b ~f calls f i t for each element t in buf, with i being its relative index within buf.
get_front buf i returns the i-th element of buf from the front, i.e. the one returned by take_front buf after i-1 calls to junk_front buf.
get_back buf i returns the i-th element of buf from the back, i.e. the one returned by take_back buf after i-1 calls to junk_back buf.
Push value at the back of t. If t.bounded=false, the buffer will grow as needed, otherwise the oldest elements are replaced first.
Create a buffer from an initial array, but doesn't take ownership of it (still allocates a new internal array).
CCSimple_queue.InfixMake.1-WCCTrie.Maketype char_ = W.char_type key = W.tval empty : 'a tval is_empty : _ t -> boollongest_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".
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.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ( 'a -> unit ) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
MakeArray.1-XCCTrie.MakeArraytype char_ = X.ttype key = X.t arrayval empty : 'a tval is_empty : _ t -> boollongest_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".
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.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ( 'a -> unit ) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
MakeList.1-XCCTrie.MakeListtype char_ = X.ttype key = X.t listval empty : 'a tval is_empty : _ t -> boollongest_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".
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.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ( 'a -> unit ) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.Stringval empty : 'a tval is_empty : _ t -> boollongest_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".
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.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ( 'a -> unit ) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.ORDEREDCCTrie.Sval empty : 'a tval is_empty : _ t -> boollongest_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".
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.
Fold on key/value bindings. Will use WORD.of_list to rebuild keys.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
val fold_values : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'bMore efficient version of fold, that doesn't keep keys.
val iter_values : ( 'a -> unit ) -> 'a t -> unitMerge two tries together. The function is used in case of conflicts, when a key belongs to both tries.
val size : _ t -> intNumber of bindings.
All bindings whose key is bigger or equal to the given key, in ascending order.
CCTrie.WORDMake.1-XCCWBTree.Maketype key = X.tval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
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.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intMap values, giving both key and value. Will use WORD.of_list to rebuild keys.
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.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
MakeFull.1-XCCWBTree.MakeFullUse the custom X.weight function
type key = X.tval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
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.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intMap values, giving both key and value. Will use WORD.of_list to rebuild keys.
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.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
CCWBTree.KEYCCWBTree.ORDCCWBTree.Sval empty : 'a tval is_empty : _ t -> boolnth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
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.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
val cardinal : _ t -> intval weight : _ t -> intMap values, giving both key and value. Will use WORD.of_list to rebuild keys.
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.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.
CCLock.LockRefType allowing to manipulate the lock as a reference.
Fut.InfixMake.FutThe futures are registration points for callbacks, storing a state, that are executed in the pool using run.
type 'a future = 'a tval return : 'a -> 'a tFuture that is already computed.
val fail : exn -> 'a tFuture that fails immediately.
val make : ( unit -> 'a ) -> 'a tCreate a future, representing a value that will be computed by the function. If the function raises, the future will fail.
val make1 : ( 'a -> 'b ) -> 'a -> 'b tval make2 : ( 'a -> 'b -> 'c ) -> 'a -> 'b -> 'c tval get : 'a t -> 'aBlocking get: wait for the future to be evaluated, and get the value, or the exception that failed the future is returned. Raise e if the future failed with e.
val is_done : 'a t -> boolIs the future evaluated (success/failure)?
val on_success : 'a t -> ( 'a -> unit ) -> unitAttach a handler to be called upon success. The handler should not call functions on the future. Might be evaluated now if the future is already done.
val on_failure : _ t -> ( exn -> unit ) -> unitAttach a handler to be called upon failure. The handler should not call any function on the future. Might be evaluated now if the future is already done.
Attach a handler to be called when the future is evaluated. The handler should not call functions on the future. Might be evaluated now if the future is already done.
Wait for the first future to succeed, then launch the second.
Future that waits for all previous futures to terminate. If any future in the array fails, sequence_a l fails too.
map_a f a maps f on every element of a, and will return the array of every result if all calls succeed, or an error otherwise.
Future that waits for all previous futures to terminate. If any future in the list fails, sequence_l l fails too.
map_l f l maps f on every element of l, and will return the list of every result if all calls succeed, or an error otherwise.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Choose among those futures (the first to terminate). Behaves like the first future that terminates, by failing if the future fails.
Map the value inside the future, to be computed in a separated job.
Cartesian product of the content of these futures.
app_async f x applies the result of f to the result of x, in a separated job scheduled in the pool.
val sleep : float -> unit tFuture that returns with success in the given amount of seconds. Blocks the thread! If you need to wait on many events, consider using CCTimer.
module Infix : sig ... endinclude module type of InfixMake.1-PCCPool.MakeAfter calling stop (), most functions will raise Stopped. This has the effect of preventing new tasks from being executed.
module Fut : sig ... endCCPool.PARAMCCThread.Arrval spawn : int -> ( int -> 'a ) -> t arrayArr.spawn n f creates an array res of length n, such that res.(i) = spawn (fun () -> f i).
val join : t array -> unitArr.join a joins every thread in a.
CCThread.Barrierval create : unit -> tCreate a barrier.
val reset : t -> unitReset to initial (non-triggered) state.
val wait : t -> unitwait 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.
val activate : t -> unitactivate b unblocks all threads that were waiting on b.
val activated : t -> boolactivated 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.
CCArray.FloatarrayCCArray.Infixval (--) : int -> int -> int tx -- y creates an array containing integers in the range x .. y. Bounds included.
val (--^) : int -> int -> int tx --^ y creates an array containing integers in the range x .. y. Right bound excluded.
CCArray.MONO_ARRAYCCArrayLabels.FloatarrayCCArrayLabels.Infixval (--) : int -> int -> int tx -- y creates an array containing integers in the range x .. y. Bounds included.
val (--^) : int -> int -> int tx --^ y creates an array containing integers in the range x .. y. Right bound excluded.
CCArrayLabels.MONO_ARRAYMake.1-Sexpval atom : string -> tCCCanonical_sexp.Maketype t = Sexp.ttype sexp = tval atom : string -> tMake an atom out of this string.
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_file_iter : string -> t CCSexp_intf.iter -> unitPrint the given iter of expressions to a file.
val to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
val parse_string : string -> t CCSexp_intf.or_errorParse a string.
val parse_string_list : string -> t list CCSexp_intf.or_errorParse a string into a list of S-exprs.
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_errorParse 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 ->
- t CCSexp_intf.or_error CCSexp_intf.genParse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_errorval parse_file : string -> t CCSexp_intf.or_errorOpen the file and read a S-exp from it.
val parse_file_list : string -> t list CCSexp_intf.or_errorOpen the file and read a S-exp from it.
CCChar.InfixCCEqual.InfixCCEqualLabels.InfixCCFloat.InfixCCFormat.ANSI_codesANSI escape codes. This contains lower level functions for them.
A style. Styles can be composed in a list.
clear_line is an escape code to clear the current line. It is very useful for progress bars; for example:
let pp_progress i =
- Printf.printf "%sprogress at %d%!" ANSI_codes.clear_line iif called repeatedly this will print successive progress messages on a single line.
val string_of_style : style -> stringstring_of_style st is an escape code to set the current style to st. It can be printed as is on any output that is a compatible terminal.
val string_of_style_list : style list -> stringstring_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.
CCFormat.Dumptype 'a t = 'a printerval unit : unit tval int : int tval string : string tval bool : bool tval float : float tval char : char tval int32 : int32 tval int64 : int64 tval nativeint : nativeint tval to_string : 'a t -> 'a -> stringAlias to CCFormat.to_string.
CCFormat.InfixCCFun.Infix(f %> g) x or (%>) f g x is g (f x). Alias to compose.
Monad.1-XCCFun.Monadmodule X : sig ... endtype 'a t = X.t -> 'aval return : 'a -> 'a tMonadic return.
CCHashtbl.Makeget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
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).
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.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
val values_list : 'a t -> 'a listvalues_list t is the list of values in t.
Map on a hashtable's items, collect into a list.
Add the corresponding pairs to the table, using Hashtbl.add.
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.
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.
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.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
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.
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.
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.
Like add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
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.
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.
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.
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- ?pp_arrow:unit printer ->
- key printer ->
- 'a printer ->
- 'a t printerpp ~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.
CCHashtbl.Polyget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
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 : ( 'a, 'b ) Stdlib.Hashtbl.t -> 'a iterkeys tbl f iterates on keys (similar order as Hashtbl.iter).
val values : ( 'a, 'b ) Stdlib.Hashtbl.t -> 'b itervalues tbl f iterates on values in the table 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.
values_list tbl is the list of values in tbl.
map_list f tbl maps on a tbl's items. Collect into a list.
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).
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.
val to_iter : ( 'a, 'b ) Stdlib.Hashtbl.t -> ('a * 'b) iterIterate on bindings in the table.
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
val add_iter : ( 'a, 'b ) Stdlib.Hashtbl.t -> ('a * 'b) iter -> unitAdd the corresponding pairs to the table, using Hashtbl.add.
val add_iter_with :
- f:( 'a -> 'b -> 'b -> 'b ) ->
- ( 'a, 'b ) Stdlib.Hashtbl.t ->
- ('a * 'b) iter ->
- unitAdd 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.
val add_seq_with :
- f:( 'a -> 'b -> 'b -> 'b ) ->
- ( 'a, 'b ) Stdlib.Hashtbl.t ->
- ('a * 'b) Stdlib.Seq.t ->
- unitAdd 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.
val of_iter : ('a * 'b) iter -> ( 'a, 'b ) Stdlib.Hashtbl.tFrom the given bindings, added in order.
val of_iter_with :
- f:( 'a -> 'b -> 'b -> 'b ) ->
- ('a * 'b) iter ->
- ( 'a, 'b ) Stdlib.Hashtbl.tFrom 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.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
val of_seq_with :
- f:( 'a -> 'b -> 'b -> 'b ) ->
- ('a * 'b) Stdlib.Seq.t ->
- ( 'a, 'b ) Stdlib.Hashtbl.tFrom 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.
val add_iter_count : ( 'a, int ) Stdlib.Hashtbl.t -> 'a iter -> unitadd_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.
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.
val of_iter_count : 'a iter -> ( 'a, int ) Stdlib.Hashtbl.tLike add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
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.tFrom 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.
val update :
- ( 'a, 'b ) Stdlib.Hashtbl.t ->
- f:( 'a -> 'b option -> 'b option ) ->
- k:'a ->
- unitupdate 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.
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- ?pp_arrow:unit printer ->
- 'a printer ->
- 'b printer ->
- ( 'a, 'b ) Stdlib.Hashtbl.t printerpp ~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.
CCHashtbl.Sget tbl k finds a binding for the key k if present, or returns None if no value is found. Safe version of Hashtbl.find.
get_or tbl k ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in tbl).
add_list tbl x y adds y to the list x is bound to. If x is not bound, it becomes bound to y.
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).
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.
keys_list tbl is the list of keys in tbl. If the key is in the Hashtable multiple times, all occurrences will be returned.
val values_list : 'a t -> 'a listvalues_list t is the list of values in t.
Map on a hashtable's items, collect into a list.
Add the corresponding pairs to the table, using Hashtbl.add.
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.
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.
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.
From the given bindings, added in order. Renamed from of_std_seq since 3.0.
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.
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.
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.
Like add_seq_count, but allocates a new table and returns it.
Like add_seq_count, but allocates a new table and returns it. Renamed from of_std_seq_count since 3.0.
to_list tbl returns the list of (key,value) bindings (order unspecified).
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.
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.
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.
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- ?pp_arrow:unit printer ->
- key printer ->
- 'a printer ->
- 'a t printerpp ~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.
Make.1-ECCHeap.Makemodule E : PARTIAL_ORDtype elt = E.tval empty : tempty returns the empty heap.
val is_empty : t -> boolis_empty h returns true if the heap h is empty.
filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.
take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.
delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.
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.
iter f h iterates over the heap h invoking f with the current element.
val size : t -> intsize h is the number of elements in the heap h. Linear complexity.
to_list_sorted h returns the elements of the heap h in increasing order.
add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.
add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.
of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.
to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.
to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.
to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.
to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- elt printer ->
- t printerpp ?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
Make_from_compare.1-ECCHeap.Make_from_compareA 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
type elt = E.tval empty : tempty returns the empty heap.
val is_empty : t -> boolis_empty h returns true if the heap h is empty.
filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.
take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.
delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.
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.
iter f h iterates over the heap h invoking f with the current element.
val size : t -> intsize h is the number of elements in the heap h. Linear complexity.
to_list_sorted h returns the elements of the heap h in increasing order.
add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.
add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.
of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.
to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.
to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.
to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.
to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- elt printer ->
- t printerpp ?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
CCHeap.PARTIAL_ORDCCHeap.Sval empty : tempty returns the empty heap.
val is_empty : t -> boolis_empty h returns true if the heap h is empty.
filter p h filters values, only retaining the ones that satisfy the predicate p. Linear time at least.
take h extracts and returns the minimum element, and the new heap (without this element), or None if the heap h is empty.
delete_one eq x h uses eq to find one occurrence of a value x if it exist in the heap h, and delete it. If h do not contain x then it return h.
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.
iter f h iterates over the heap h invoking f with the current element.
val size : t -> intsize h is the number of elements in the heap h. Linear complexity.
to_list_sorted h returns the elements of the heap h in increasing order.
add_list h l adds the elements of the list l into the heap h. An element occurring several times will be added that many times to the heap.
add_seq h seq is like add_list. Renamed from add_std_seq since 3.0.
of_seq seq builds a heap from a given Seq.t. Complexity: O(n log n). Renamed from of_seq since 3.0.
to_seq h returns a Seq.t of the elements of the heap h. Renamed from to_std_seq since 3.0.
to_iter_sorted h returns a iter by iterating on the elements of h, in increasing order.
to_seq_sorted h returns a Seq.t by iterating on the elements of h, in increasing order. Renamed from to_std_seq_sorted since 3.0.
to_string ?sep f h prints the heap h in a string using sep as a given separator (default ",") between each element (converted to a string using f).
val pp :
- ?pp_start:unit printer ->
- ?pp_stop:unit printer ->
- ?pp_sep:unit printer ->
- elt printer ->
- t printerpp ?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
CCHeap.TOTAL_ORDCCIO.FileA file should be represented by its absolute path, but currently this is not enforced.
val to_string : t -> stringval make : string -> tBuild a file representation from a path (absolute or relative).
val exists : t -> boolval is_directory : t -> boolval remove_exn : t -> unitremove_exn path tries to remove the file at path from the file system.
val remove_noerr : t -> unitLike remove_exn but do not raise any exception on failure.
read_dir d returns a sequence of files and directory contained in the directory d (or an empty stream if d is not a directory).
val read_exn : t -> stringRead the content of the given file, or raises some exception.
val append_exn : t -> string -> unitAppend the given string into the given file, possibly raising.
val write_exn : t -> string -> unitWrite the given string into the given file, possibly raising.
type walk_item = [ `File | `Dir ] * tLike 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.)
Like walk but returns a list (therefore it's eager and might take some time on large directories).
val show_walk_item : walk_item -> stringval with_temp :
- ?temp_dir:string ->
- prefix:string ->
- suffix:string ->
- ( string -> 'a ) ->
- 'awith_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.
CCInt.InfixCCInt32.Infixx / 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, filling in with zeroes. The result is unspecified if y < 0 or y >= 32.
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.
CCInt64.Infixx / 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, filling in with zeroes. The result is unspecified if y < 0 or y >= 64.
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.
CCList.Assocval get : eq:( 'a -> 'a -> bool ) -> 'a -> ( 'a, 'b ) t -> 'b optionget ~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 -> 'bget_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
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 -> boolmem ?eq k alist returns true iff k is a key in alist.
val update :
- eq:( 'a -> 'a -> bool ) ->
- f:( 'b option -> 'b option ) ->
- 'a ->
- ( 'a, 'b ) t ->
- ( 'a, 'b ) tupdate ~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'.
remove ~eq k alist returns the alist without the first pair with key k, if any.
val keys : ( 'a, 'b ) t -> 'a listkeys alist returns a list of all keys of alist.
val values : ( 'a, 'b ) t -> 'b listvalues alist returns a list of all values of alist.
CCList.Infixl >|= f is the infix version of map with reversed arguments.
val (--) : int -> int -> int ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
- let+ x = xs
- and& y = ys
- and& z = zs in
- x + y + z;;
-val f : int list -> int list -> int list -> int list = <fun>
-# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]CCList.Refval push : 'a t -> 'a -> unitpush rlist e adds an element e at the head of rlist.
val pop : 'a t -> 'a optionpop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty
val pop_exn : 'a t -> 'apop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.
val create : unit -> 'a tcreate () creates a new empty reference list.
val clear : _ t -> unitclear rlist removes all elements of rlist.
val lift : ( 'a list -> 'b ) -> 'a t -> 'blift f rlist applies a list function f to the content of rlist.
val push_list : 'a t -> 'a list -> unitpush_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.
Traverse.1-Mval return : 'a -> 'a treturn is the Monadic return.
CCList.TraverseThis 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.
Fold a function with a monadic effect through a list.
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.
CCList.MONADval return : 'a -> 'a treturn is the Monadic return.
CCListLabels.Assocval get : eq:( 'a -> 'a -> bool ) -> 'a -> ( 'a, 'b ) t -> 'b optionget ~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 -> 'bget_exn ~eq k alist returns v if the element k is present into alist. Like get, but unsafe.
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 -> boolmem ?eq k alist returns true iff k is a key in alist.
val update :
- eq:( 'a -> 'a -> bool ) ->
- f:( 'b option -> 'b option ) ->
- 'a ->
- ( 'a, 'b ) t ->
- ( 'a, 'b ) tupdate ~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'.
remove ~eq k alist returns the alist without the first pair with key k, if any.
val keys : ( 'a, 'b ) t -> 'a listkeys alist returns a list of all keys of alist.
val values : ( 'a, 'b ) t -> 'b listvalues alist returns a list of all values of alist.
CCListLabels.Infixl >|= f is the infix version of map with reversed arguments.
l1 @ l2 concatenates two lists l1 and l2. As append.
funs <*> l is product (fun f x -> f x) funs l.
val (--) : int -> int -> int CCList.ti -- j is the infix alias for range. Bounds included.
val (--^) : int -> int -> int CCList.ti --^ j is the infix alias for range'. Second bound j excluded.
(and&) is combine_shortest. It allows to perform a synchronized product between two lists, stopping gently at the shortest. Usable both with let+ and let*.
# let f xs ys zs =
- let+ x = xs
- and& y = ys
- and& z = zs in
- x + y + z;;
-val f : int list -> int list -> int list -> int list = <fun>
-# f [1;2] [5;6;7] [10;10];;
-- : int list = [16; 18]CCListLabels.Refval push : 'a t -> 'a -> unitpush rlist e adds an element e at the head of rlist.
val pop : 'a t -> 'a optionpop rlist removes and returns Some e (the first element of rlist) or None if the rlist is empty
val pop_exn : 'a t -> 'apop_exn rlist removes and returns the first element of rlist. Unsafe version of pop.
val create : unit -> 'a tcreate () creates a new empty reference list.
val clear : _ t -> unitclear rlist removes all elements of rlist.
val lift : ( 'a list -> 'b ) -> 'a t -> 'blift f rlist applies a list function f to the content of rlist.
val push_list : 'a t -> 'a list -> unitpush_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.
Traverse.1-Mval return : 'a -> 'a treturn is the Monadic return.
CCListLabels.TraverseCCListLabels.MONADval return : 'a -> 'a treturn is the Monadic return.
CCMap.Makeget k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
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 None k is removed from m, and if the result is Some v' then add k v' m is returned.
choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.
min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.
max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.
find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
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.
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.
val merge_safe :
- f:( key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option ) ->
- 'a t ->
- 'b t ->
- 'c tmerge_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.
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.
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.
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.
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.
to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.
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.
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.
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.
to_list m builds a list of the bindings of the given map m. The order is unspecified.
CCMap.Sget k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
get_or k m ~default returns the value associated to k if present, and returns default otherwise (if k doesn't belong in m).
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 None k is removed from m, and if the result is Some v' then add k v' m is returned.
choose_opt m returns one binding of the given map m, or None if m is empty. Safe version of choose.
min_binding_opt m returns the smallest binding of the given map m, or None if m is empty. Safe version of min_binding.
max_binding_opt m returns the largest binding of the given map m, or None if m is empty. Safe version of max_binding.
find_opt k m returns Some v if the current binding of k in m is v, or None if the key k is not present. Safe version of find.
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.
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.
val merge_safe :
- f:( key -> [ `Left of 'a | `Right of 'b | `Both of 'a * 'b ] -> 'c option ) ->
- 'a t ->
- 'b t ->
- 'c tmerge_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.
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.
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.
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.
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.
to_iter m iterates on the whole map m, creating an iter of bindings. Like to_list.
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.
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.
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.
to_list m builds a list of the bindings of the given map m. The order is unspecified.
CCNativeint.Infixx / 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.
CCOpt.Infixf <*> o returns Some (f x) if o is Some x and None if o is None.
CCOption.Infixf <*> o returns Some (f x) if o is Some x and None if o is None.
CCOrd.Infixval (<?>) : int -> ('a t * 'a * 'a) -> intc1 <?> (ord, x, y) returns the same as c1 if c1 is not 0; otherwise it uses ord to compare the two values x and y, of type 'a.
CCParse.Debug_Debugging utils. EXPERIMENTAL
trace_fail name p behaves like p, but prints the error message of p on stderr whenever p fails.
trace_success name ~print p behaves like p, but prints successful runs of p using print.
CCParse.Errorval line_and_column : t -> int * intLine and column numbers of the error position.
val msg : t -> stringval to_string : t -> stringPrints the error
val pp : Stdlib.Format.formatter -> t -> unitPretty prints the error
CCParse.InfixAlias to map. p >|= f parses an item x using p, and returns f x.
Alias to bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.
a <* b parses a into x, parses b and ignores its result, and returns x.
a *> b parses a, then parses b into x, and returns x. The result of a is ignored.
Alias to or_.
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.
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".
Alias to both. a ||| b parses a, then b, then returns the pair of their results.
CCParse.Positiontype t = positionval line : t -> intLine number, 0 based
val column : t -> intColumn number, 0 based
val line_and_column : t -> int * intLine and column number
val pp : Stdlib.Format.formatter -> t -> unitUnspecified pretty-printed version of the position.
CCParse.SliceFunctions on slices.
type t = sliceval is_empty : t -> boolIs the slice empty?
val length : t -> intLength of the slice
val to_string : t -> stringConvert the slice into a string. Linear time and memory in length slice
CCParse.UThis is useful to parse OCaml-like values in a simple way. All the parsers are whitespace-insensitive (they skip whitespace).
list p parses a list of p, with the OCaml conventions for start token "[", stop token "]" and separator ";". Whitespace between items are skipped.
val int : int tParse an int in decimal representation.
in_parens_opt p parses p in an arbitrary number of nested parenthesis (possibly 0).
option p parses "Some <x>" into Some x if p parses "<x>" into x, and parses "None" into None.
val hexa_int : int tParse an int int hexadecimal format. Accepts an optional 0x prefix, and ignores capitalization.
val word : string tNon empty string of alpha num, start with alpha.
val bool : bool tAccepts "true" or "false"
Parse a pair using OCaml syntactic conventions. The default is "(a, b)".
CCResult.InfixInfix version of map with reversed arguments.
Monadic composition. e >>= f proceeds as f x if e is Ok x or returns e if e is an Error.
a <*> b evaluates a and b, and, in case of success, returns Ok (a b). Otherwise, it fails, and the error of a is chosen over the error of b if both fail.
Traverse.1-Mval return : 'a -> 'a tMonadic return.
CCResult.TraverseCCResult.MONADval return : 'a -> 'a tMonadic return.
CCSeqHelpers for the standard Seq type
See oseq for a richer API.
type +'a t = unit -> 'a nodeval nil : 'a tval empty : 'a tval singleton : 'a -> 'a tval repeat : ?n:int -> 'a -> 'a trepeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.
val unfold : ( 'b -> ('a * 'b) option ) -> 'b -> 'a tunfold f acc calls f acc and:
f acc = Some (x, acc'), yield x, continue with unfold f acc'.f acc = None, stops.val is_empty : 'a t -> boolval head : 'a t -> 'a optionHead of the list.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aFold on values.
val iter : ( 'a -> unit ) -> 'a t -> unitval iteri : ( int -> 'a -> unit ) -> 'a t -> unitIterate with index (starts at 0).
val length : _ t -> intNumber of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.
Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.
Specialization of product_with producing tuples.
group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].
uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.
val for_all : ( 'a -> bool ) -> 'a t -> boolfor_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.
val exists : ( 'a -> bool ) -> 'a t -> boolexists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.
val range : int -> int -> int tval (--) : int -> int -> int ta -- b is the range of integers containing a and b (therefore, never empty).
val (--^) : int -> int -> int ta -- b is the integer range from a to b, where b is excluded.
Fold on two collections at once. Stop at soon as one of them ends.
Map on two collections at once. Stop as soon as one of the arguments is exhausted.
Iterate on two collections at once. Stop as soon as one of them ends.
Combine elements pairwise. Stop as soon as one of the lists stops.
Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.
Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.
val return : 'a -> 'a tval pure : 'a -> 'a tInfix version of fair_flat_map.
module Infix : sig ... endmodule type MONAD = sig ... endval of_list : 'a list -> 'a tval to_list : 'a t -> 'a listGather all values into a list.
val of_array : 'a array -> 'a tIterate on the array.
val to_array : 'a t -> 'a arrayConvert into array.
val of_string : string -> char tIterate on characters.
val pp :
+CCSeq (containers.CCSeq) Module CCSeq
Helpers for the standard Seq type
See oseq for a richer API.
Basics
include module type of Stdlib.Seq
type !'a t = unit -> 'a nodeval fold_lefti : ( 'b -> int -> 'a -> 'b ) -> 'b -> 'a t -> 'bval find : ( 'a -> bool ) -> 'a t -> 'a optionval find_map : ( 'a -> 'b option ) -> 'a t -> 'b optionval init : int -> ( int -> 'a ) -> 'a tval forever : ( unit -> 'a ) -> 'a tval iterate : ( 'a -> 'a ) -> 'a -> 'a tval of_dispenser : ( unit -> 'a option ) -> 'a tval to_dispenser : 'a t -> unit -> 'a optionval ints : int -> int tval nil : 'a tval empty : 'a tval singleton : 'a -> 'a tval repeat : ?n:int -> 'a -> 'a trepeat ~n x repeats x n times then stops. If n is omitted, then x is repeated forever.
val unfold : ( 'b -> ('a * 'b) option ) -> 'b -> 'a tunfold f acc calls f acc and:
- if
f acc = Some (x, acc'), yield x, continue with unfold f acc'. - if
f acc = None, stops.
val is_empty : 'a t -> boolval head : 'a t -> 'a optionHead of the list.
val fold : ( 'a -> 'b -> 'a ) -> 'a -> 'b t -> 'aFold on values.
val iter : ( 'a -> unit ) -> 'a t -> unitval iteri : ( int -> 'a -> unit ) -> 'a t -> unitIterate with index (starts at 0).
val length : _ t -> intNumber of elements in the list. Will not terminate if the list if infinite: use (for instance) take to make the list finite if necessary.
Fair product of two (possibly infinite) lists into a new list. Lazy. The first parameter is used to combine each pair of elements.
Specialization of product_with producing tuples.
group eq l groups together consecutive elements that satisfy eq. Lazy. For instance group (=) [1;1;1;2;2;3;3;1] yields [1;1;1]; [2;2]; [3;3]; [1].
uniq eq l returns l but removes consecutive duplicates. Lazy. In other words, if several values that are equal follow one another, only the first of them is kept.
val for_all : ( 'a -> bool ) -> 'a t -> boolfor_all p [a1; ...; an] checks if all elements of the sequence satisfy the predicate p. That is, it returns (p a1) && ... && (p an) for a non-empty list and true if the sequence is empty. It consumes the sequence until it finds an element not satisfying the predicate.
val exists : ( 'a -> bool ) -> 'a t -> boolexists p [a1; ...; an] checks if at least one element of the sequence satisfies the predicate p. That is, it returns (p a1) || ... || (p an) for a non-empty sequence and false if the list is empty. It consumes the sequence until it finds an element satisfying the predicate.
val range : int -> int -> int tval (--) : int -> int -> int ta -- b is the range of integers containing a and b (therefore, never empty).
val (--^) : int -> int -> int ta -- b is the integer range from a to b, where b is excluded.
Operations on two Collections
Fold on two collections at once. Stop at soon as one of them ends.
Map on two collections at once. Stop as soon as one of the arguments is exhausted.
Iterate on two collections at once. Stop as soon as one of them ends.
Combine elements pairwise. Stop as soon as one of the lists stops.
Misc
Eager sort. Require the iterator to be finite. O(n ln(n)) time and space.
Eager sort that removes duplicate values. Require the iterator to be finite. O(n ln(n)) time and space.
Fair Combinations
Implementations
val return : 'a -> 'a tval pure : 'a -> 'a tInfix version of fair_flat_map.
Infix operators
module Infix : sig ... endmodule type MONAD = sig ... endConversions
val of_list : 'a list -> 'a tval to_list : 'a t -> 'a listGather all values into a list.
val of_array : 'a array -> 'a tIterate on the array.
val to_array : 'a t -> 'a arrayConvert into array.
val of_string : string -> char tIterate on characters.
IO
val pp :
?pp_start:unit printer ->
?pp_stop:unit printer ->
?pp_sep:unit printer ->
diff --git a/dev/containers/CCSet/Make/index.html b/dev/containers/CCSet/Make/index.html
deleted file mode 100644
index eccf0044..00000000
--- a/dev/containers/CCSet/Make/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-Make (containers.CCSet.Make) Module CCSet.Make
Parameters
Signature
Safe version of find_first.
\ 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
deleted file mode 100644
index 023f3ccf..00000000
--- a/dev/containers/CCSet/module-type-S/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-S (containers.CCSet.S) Module type CCSet.S
Safe version of find_first.
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Decoder/index.html b/dev/containers/CCSexp/Decoder/index.html
deleted file mode 100644
index 78a0c0f0..00000000
--- a/dev/containers/CCSexp/Decoder/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Decoder (containers.CCSexp.Decoder) Module CCSexp.Decoder
val of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
val to_list : t -> sexp list CCSexp_intf.or_errorRead all the values from this decoder.
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Make/Decoder/index.html b/dev/containers/CCSexp/Make/Decoder/index.html
deleted file mode 100644
index 4baa65bf..00000000
--- a/dev/containers/CCSexp/Make/Decoder/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Decoder (containers.CCSexp.Make.Decoder) Module Make.Decoder
val of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
val to_list : t -> sexp list CCSexp_intf.or_errorRead all the values from this decoder.
\ 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
deleted file mode 100644
index 79b01c27..00000000
--- a/dev/containers/CCSexp/Make/argument-1-Sexp/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Sexp (containers.CCSexp.Make.1-Sexp) Parameter Make.1-Sexp
val make_loc : ( (int * int) -> (int * int) -> string -> loc ) optionIf provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename
\ No newline at end of file
diff --git a/dev/containers/CCSexp/Make/index.html b/dev/containers/CCSexp/Make/index.html
deleted file mode 100644
index c6d25fa6..00000000
--- a/dev/containers/CCSexp/Make/index.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Make (containers.CCSexp.Make) Module CCSexp.Make
Functorized operations
This builds a parser and printer for S-expressions represented as in the Sexp argument.
Parameters
Signature
include CCSexp_intf.S0 with type t = Sexp.t
type t = Sexp.ttype sexp = tRe-exports
val atom : string -> tMake an atom out of this string.
Constructors
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
Printing
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_file_iter : string -> t CCSexp_intf.iter -> unitPrint the given iter of expressions to a file.
val to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
Parsing
val parse_string : string -> t CCSexp_intf.or_errorParse a string.
val parse_string_list : string -> t list CCSexp_intf.or_errorParse a string into a list of S-exprs.
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_errorParse 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 ->
- t CCSexp_intf.or_error CCSexp_intf.genParse a channel into a generator of S-expressions.
val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_errorval parse_file : string -> t CCSexp_intf.or_errorOpen the file and read a S-exp from it.
val parse_file_list : string -> t list CCSexp_intf.or_errorOpen the file and read a S-exp from it.
type loc = Sexp.locLocations for the S-expressions.
Parsing
A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.
module Decoder : sig ... end
\ 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
deleted file mode 100644
index 258a805f..00000000
--- a/dev/containers/CCSexp_intf/module-type-BASIC_SEXP/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-BASIC_SEXP (containers.CCSexp_intf.BASIC_SEXP) Module type CCSexp_intf.BASIC_SEXP
Abstract representation of S-expressions
val atom : string -> t
\ 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
deleted file mode 100644
index ad280bc6..00000000
--- a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Decoder (containers.CCSexp_intf.S.Decoder) Module S.Decoder
val of_lexbuf : Stdlib.Lexing.lexbuf -> tval next : t -> sexp parse_resultParse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.
\ 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
deleted file mode 100644
index 1586ffe6..00000000
--- a/dev/containers/CCSexp_intf/module-type-S/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-S (containers.CCSexp_intf.S) Module type CCSexp_intf.S
Operations over S-expressions (extended)
include S0
type sexp = tRe-exports
val atom : string -> tMake an atom out of this string.
Constructors
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
Printing
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
Parsing
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 channel into a generator of S-expressions.
Parsing
A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.
module Decoder : sig ... end
\ 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
deleted file mode 100644
index a27c8047..00000000
--- a/dev/containers/CCSexp_intf/module-type-S0/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-S0 (containers.CCSexp_intf.S0) Module type CCSexp_intf.S0
Operations over S-expressions
type sexp = tRe-exports
val atom : string -> tMake an atom out of this string.
Constructors
val of_int : int -> tval of_bool : bool -> tval of_float : float -> tval of_unit : tof_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.
Printing
val to_buf : Stdlib.Buffer.t -> t -> unitval to_string : t -> stringval to_file : string -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval pp : Stdlib.Format.formatter -> t -> unitPretty-printer nice on human eyes (including indentation).
val pp_noindent : Stdlib.Format.formatter -> t -> unitRaw, direct printing as compact as possible.
Parsing
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 channel into a generator of S-expressions.
\ 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
deleted file mode 100644
index 856860f4..00000000
--- a/dev/containers/CCSexp_intf/module-type-SEXP/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-SEXP (containers.CCSexp_intf.SEXP) Module type CCSexp_intf.SEXP
Abstract representation of S-expressions (extended)
val make_loc : ( (int * int) -> (int * int) -> string -> loc ) optionIf provided, builds a location from a pair of (line,column) positions, and a (possibly dummy) filename
\ No newline at end of file
diff --git a/dev/containers/CCShims_syntax/module-type-LET/index.html b/dev/containers/CCShims_syntax/module-type-LET/index.html
deleted file mode 100644
index 9e9a43c4..00000000
--- a/dev/containers/CCShims_syntax/module-type-LET/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-LET (containers.CCShims_syntax.LET) Module type CCShims_syntax.LET
Let operators on OCaml >= 4.08.0, nothing otherwise
\ No newline at end of file
diff --git a/dev/containers/CCString/Find/index.html b/dev/containers/CCString/Find/index.html
deleted file mode 100644
index 0495186f..00000000
--- a/dev/containers/CCString/Find/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Find (containers.CCString.Find) Module CCString.Find
val compile : string -> [ `Direct ] patternval rcompile : string -> [ `Reverse ] patternval find : ?start:int -> pattern:[ `Direct ] pattern -> string -> intfind ~start ~pattern s searches for pattern in the string s, left-to-right.
val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> intrfind ~start ~pattern s searches for pattern in the string s, right-to-left.
\ No newline at end of file
diff --git a/dev/containers/CCString/Infix/index.html b/dev/containers/CCString/Infix/index.html
deleted file mode 100644
index 37ac3cfe..00000000
--- a/dev/containers/CCString/Infix/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Infix (containers.CCString.Infix) Module CCString.Infix
\ No newline at end of file
diff --git a/dev/containers/CCString/Split/index.html b/dev/containers/CCString/Split/index.html
deleted file mode 100644
index f56dc8bb..00000000
--- a/dev/containers/CCString/Split/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Split (containers.CCString.Split) Module CCString.Split
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.
val no_drop : drop_if_emptyno_drop does not drop any group, even empty and on borders.
val list_ :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) listlist_ ~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.
val gen :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) gengen ~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) iteriter ~drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
val seq :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) Stdlib.Seq.tseq ~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.
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 listlist_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 gengen_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 iteriter_cpy ~drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.tseq_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.
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Find/index.html b/dev/containers/CCStringLabels/Find/index.html
deleted file mode 100644
index c557c26b..00000000
--- a/dev/containers/CCStringLabels/Find/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Find (containers.CCStringLabels.Find) Module CCStringLabels.Find
val compile : string -> [ `Direct ] patternval rcompile : string -> [ `Reverse ] patternval find : ?start:int -> pattern:[ `Direct ] pattern -> string -> intfind ?start ~pattern s searches for pattern in the string s, left-to-right.
val rfind : ?start:int -> pattern:[ `Reverse ] pattern -> string -> intrfind ?start ~pattern s searches for pattern in the string s, right-to-left.
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Infix/index.html b/dev/containers/CCStringLabels/Infix/index.html
deleted file mode 100644
index d8067fdc..00000000
--- a/dev/containers/CCStringLabels/Infix/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Infix (containers.CCStringLabels.Infix) Module CCStringLabels.Infix
\ No newline at end of file
diff --git a/dev/containers/CCStringLabels/Split/index.html b/dev/containers/CCStringLabels/Split/index.html
deleted file mode 100644
index bd231816..00000000
--- a/dev/containers/CCStringLabels/Split/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Split (containers.CCStringLabels.Split) Module CCStringLabels.Split
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.
val no_drop : drop_if_emptyno_drop does not drop any group, even empty and on borders.
val list_ :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) listlist_ ?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.
val gen :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) gengen ?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) iteriter ?drop ~by s splits the given string s along the given separator by. Returns an iter of slices.
val seq :
- ?drop:drop_if_empty ->
- by:string ->
- string ->
- (string * int * int) Stdlib.Seq.tseq ?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.
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 listlist_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 gengen_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 iteriter_cpy ?drop ~by s splits the given string s along the given separator by. Returns an iter of strings.
val seq_cpy : ?drop:drop_if_empty -> by:string -> string -> string Stdlib.Seq.tseq_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.
left ~by s splits on the first occurrence of by from the leftmost part of the string s.
left_exn ~by s splits on the first occurrence of by from the leftmost part of the string s.
right ~by s splits on the first occurrence of by from the rightmost part of the string s.
\ No newline at end of file
diff --git a/dev/containers/CCUnix/Infix/index.html b/dev/containers/CCUnix/Infix/index.html
deleted file mode 100644
index a9824809..00000000
--- a/dev/containers/CCUnix/Infix/index.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Infix (containers.CCUnix.Infix) Module CCUnix.Infix
val (?|) : ( 'a, Stdlib.Buffer.t, unit, call_result ) Stdlib.format4 -> 'aInfix version of call.
val (?|&) :
- ( 'a, Stdlib.Buffer.t, unit, async_call_result ) Stdlib.format4 ->
- 'aInfix version of async_call.
\ No newline at end of file
diff --git a/dev/containers/Containers_bencode/Decode/index.html b/dev/containers/Containers_bencode/Decode/index.html
deleted file mode 100644
index f298edca..00000000
--- a/dev/containers/Containers_bencode/Decode/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Decode (containers.Containers_bencode.Decode) Module Containers_bencode.Decode
Decoding
\ No newline at end of file
diff --git a/dev/containers/Containers_bencode/Encode/index.html b/dev/containers/Containers_bencode/Encode/index.html
deleted file mode 100644
index 8dd91509..00000000
--- a/dev/containers/Containers_bencode/Encode/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Encode (containers.Containers_bencode.Encode) Module Containers_bencode.Encode
Encoding
val to_string : t -> stringval to_buffer : Stdlib.Buffer.t -> t -> unitval to_chan : Stdlib.out_channel -> t -> unitval to_fmt : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file
diff --git a/dev/containers/Containers_bencode/Str_map/index.html b/dev/containers/Containers_bencode/Str_map/index.html
deleted file mode 100644
index c60c62be..00000000
--- a/dev/containers/Containers_bencode/Str_map/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Str_map (containers.Containers_bencode.Str_map) Module Containers_bencode.Str_map
\ No newline at end of file
diff --git a/dev/containers/Containers_codegen/Bitfield/index.html b/dev/containers/Containers_codegen/Bitfield/index.html
deleted file mode 100644
index 8fb94337..00000000
--- a/dev/containers/Containers_codegen/Bitfield/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Bitfield (containers.Containers_codegen.Bitfield) Module Containers_codegen.Bitfield
Generate efficient bitfields that fit in an integer
val make : ?emit_failure_if_too_wide:bool -> name:string -> unit -> tMake a new bitfield with the given name.
val field_bit : t -> string -> unitfield_bit ty name adds a field of size 1 to the bitfield ty, with name name. The generate code will provide get/set for a boolean.
val field_int : t -> width:int -> string -> unitfield_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.
val total_width : t -> intTotal width in bits of 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
deleted file mode 100644
index 7fb791b7..00000000
--- a/dev/containers/Containers_codegen/Code/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Code (containers.Containers_codegen.Code) Module Containers_codegen.Code
\ No newline at end of file