The type of a trie. Keychains have type 'chain. The data associated with each keychain has type 'data. The description of the keychain implementation is 'desc; see Keychainable.t for details.
We derive only sexp_of for this type. For stable and round-trippable serializations, see Trie_stable.
val sexp_of_t :
('chain->Sexplib0.Sexp.t)->('data->Sexplib0.Sexp.t)->('desc->Sexplib0.Sexp.t)->('chain, 'data, 'desc)t->Sexplib0.Sexp.t
val set :
('chain, 'data, 'desc)t->keychain:'chain->data:'data->('chain, 'data, 'desc)t
val add :
('chain, 'data, 'desc)t->keychain:'chain->data:'data->(('chain, 'data, 'desc)t, 'chain)Or_duplicate.t
val add_or_error :
('chain, 'data, 'desc)t->keychain:'chain->data:'data->('chain, 'data, 'desc)tBase.Or_error.t
val add_exn :
('chain, 'data, 'desc)t->keychain:'chain->data:'data->('chain, 'data, 'desc)t
val remove : ('chain, 'data, 'desc)t->'chain->('chain, 'data, 'desc)t
val change :
('chain, 'data, 'desc)t->'chain->f:('dataBase.option->'dataBase.option)->('chain, 'data, 'desc)t
val update :
('chain, 'data, 'desc)t->'chain->f:('dataBase.option->'data)->('chain, 'data, 'desc)t
val add_multi :
('chain, 'dataBase.list, 'desc)t->keychain:'chain->data:'data->('chain, 'dataBase.list, 'desc)t
val remove_multi :
('chain, 'dataBase.list, 'desc)t->'chain->('chain, 'dataBase.list, 'desc)t
val find_multi : ('chain, 'dataBase.list, _)t->'chain->'dataBase.list
Accessors for trie nodes
val mem_trie : ('chain, 'data, 'desc)t->'chain->Base.bool
Reports whether there is a non-empty trie at the position of the given chain. Equivalently, reports whether the given key is a (non-strict) prefix of any element's key.
val find_trie : ('chain, 'data, 'desc)t->'chain->('chain, 'data, 'desc)t
Produces the trie at the given position. If not (mem_trie t keychain)], returns an empty trie.
val set_trie :
('chain, 'data, 'desc)t->keychain:'chain->trie:('chain, 'data, 'desc)t->('chain, 'data, 'desc)t
Replaces the trie node at the given position, if any, with the given trie.
val merge :
('chain, 'a, 'desc)t->('chain, 'b, 'desc)t->f:
(keychain:'chain->[ `Left of 'a| `Right of 'b| `Both of 'a * 'b ]->'cBase.option)->('chain, 'c, 'desc)t
val merge_skewed :
('chain, 'data, 'desc)t->('chain, 'data, 'desc)t->combine:(keychain:'chain->'data->'data->'data)->('chain, 'data, 'desc)t
Modules and functors specializing tries to a keychain implementation.