package aliases

  1. Overview
  2. Docs
In memory indexes

Install

Dune Dependency

Authors

Maintainers

Sources

0.0.5.tar.gz
sha256=34ef64e283322a6fa1e843efa7565c56035165c0efde1dbd7bf1f6ff104661d1
md5=d844a5c9fe0a06abfcc600a0085f45f6

doc/patriciatree/Radix/index.html

Module Radix

type 'a t

type of the functionnal radix tree.

val empty : 'a t

the empty radix tree.

val is_empty : 'a t -> bool

test whether a radix tree is empty or not

val bind : 'a t -> string -> 'a -> 'a t

bind tree str v returns a radix containing the same bindings as tree, plus a binding of str to v. If str was already bound in tree with a different value, both bindings are kept.

val remove : 'a t -> string -> 'a -> 'a t

remove tree str v returns a map containing the same bindings as tree, except for the key str with value v which is unbound in the returned map.

val fold : 'a t -> string -> ('b -> 'a -> 'b * bool) -> 'b -> 'b * bool

fold tree str f a fold over binding in tree that matching str prefix. The boolean indicate whether or not the fold should be stopped even if more matching prefix exists.

val fold_with_max : 'a t -> max:int -> string -> ('b -> 'a -> 'b) -> 'b -> 'b

fold ~max tree str f a fold over bindings in tree that matching str prefix. It will fold at most max time

OCaml

Innovation. Community. Security.