package hc

  1. Overview
  2. Docs

Hash-consing module using Ephemeron.K1.Make as a back-end cache.

Parameters

Signature

type key = H.t

The type of value that are being hash-consed.

val clear : unit -> unit

Removes all elements from the table.

val hashcons : key -> key hash_consed

hashcons v hash-cons the value v, i.e. returns any existing value equal to v that has already been hash-consed, if any; otherwise, allocates a new hash-consed value with v as a node and returns it. As a consequence the returned value is physically equal to any equal value already hash-consed.

val stats : unit -> Hashtbl.statistics

Return statistics about the hash-consing table.

val length : unit -> int

The number of hash-consed values.

OCaml

Innovation. Community. Security.