package vocal

  1. Overview
  2. Docs

Parameters

module K : HashedType

Signature

type key = K.t
type 'a table
type 'a t = 'a table
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val population : 'a t -> int
val length : 'a t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
type statistics = {
  1. num_bindings : int;
  2. num_buckets : int;
  3. max_bucket_length : int;
  4. bucket_histogram : int array;
}
val stats : 'a t -> statistics
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val to_seq : 'a t -> (key * 'a) Seq.t
OCaml

Innovation. Community. Security.