val empty : 'a t
val is_empty : _ t ‑> bool
Same as find but can fail.
longest_prefix k m
finds the longest prefix of k
that leads to
at least one path in m
(it does not mean that the prefix is bound to
a value.
Example: if m
has keys "abc0" and "abcd", then longest_prefix "abc2" m
will return "abc".
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 ‑> 'b
More efficient version of fold, that doesn't keep keys.
val iter_values : ('a ‑> unit) ‑> 'a t ‑> unit
Merge two tries together. The function is used in case of conflicts, when a key belongs to both tries.