package patricia-tree

  1. Overview
  2. Docs
type 'key t

The type of generic/heterogeneous keys

val to_int : 'key t -> int

A unique identifier for values of the type. Usually, we use a fresh counter that is increased to give a unique id to each object. Correctness of the operations requires that different values in a tree correspond to different integers.

Must be injective, return only positive values, and ideally fast

val polyeq : 'a t -> 'b t -> ('a, 'b) cmp

Polymorphic equality function used to compare our keys. It should satisfy (to_int a) = (to_int b) ==> polyeq a b = Eq

OCaml

Innovation. Community. Security.