package orsetto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=151ca6df499bd3de7aa89a4e1627411fbee24c4dea6e0e71ce21f06f181ee654
md5=00393728b481c2bf15919a8202732335
doc/orsetto.cf/Cf_rbtree/Map/Create/index.html
Module Map.Create
A functor to create a Map module.
Parameters
module K : Cf_relations.OrderSignature
val nil : 'a tThe empty map.
val empty : 'a t -> boolUse empty m to test whether m is the empty map.
val size : 'a t -> intUse size m to count the number of keys in m.
Use min m to obtain the key-value pair with the ordinally minimum key in m. Raises Not_found if m is empty.
Use max m to obtain the key-value pair with the ordinally maximum key in m. Raises Not_found if m is empty.
Use search k m to find Some v associated in the map m with key k. Returns None if m does not contain k.
Use require k m to find the value assocoated in the map m with the key k. Raises Not_found if m does not contain k.
Use insert p m to insert the key-value pair p into m, producing a new map with the inserted element and, if k is already present in m, the value replaced by the insertion.
Use replace p m to obtain a new map produced by inserting the key-value pair p into the map m, replacing any existing pair associated to the same key.
Use modify k f m to obtain a new tree produced by replacing the value in m associated with k with the result of applying it to the continuation function f. Raises Not_found if m does not contain the key.
Use extract k m to obtain the value associated with the key k in m and a new map with the key deleted from the map. Raises Not_found if the map does not contain the key.
Use delete k m to obtain a new map produced by deleting the key k from m. If m does not contain the key, then the function simply returns its argument.
Use of_seq s to consume a sequence s and compose a new map by inserting each key-value pair produced in the order produced.
Use of_seq_incr s to compose the map with key-value pairs in the sequence s. Runs in linear time if the sequence s is known to be in increasing order. Otherwise, there is an additional linear cost beyond of_seq s.
Use of_seq_decr s to compose the map with key-value pairs in the sequence s. Runs in linear time if the sequence s is known to be in decreasing order. Otherwise, there is an additional linear cost beyond of_seq s.
Use to_seq_incr m to produce the list of key-value pairs in m in order of increasing key ordinality.
Use to_seq_decr m to produce the list of key-value pairs in m in order of decreasing ordinality.
Use to_seq_nearest_decr k m to obtain the key-value pair ordinally less than or equal to k in m. Raises Not_found if m is empty or all the keys are ordinally greater.