package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

Dune Dependency

Authors

Maintainers

Sources

v3.6.0.tar.gz
md5=1bcb27dfbd130eb057561196ef851649
sha512=2a56611b09a5f1cba6457539f8b6bc87a5f2a5454b36cdb39f6e0d6a5dac6db179aab1ba87c74dd49cc41df31a9a96feb349028ea41df7371ecb47f4d9dfafc4

doc/batteries.unthreaded/BatHashcons/index.html

Module BatHashcons

Hash consing of data structures

type 'a hobj = private {
  1. obj : 'a;
  2. tag : int;
    (*

    Unique id for this object

    *)
  3. hcode : int;
    (*

    Hash code for this object

    *)
}

The type t hobj represents hashed objects of type t. A hashed object contains a unique tag and a hash code.

type 'a t = 'a hobj

A synonym for convenience

val compare : 'a hobj -> 'a hobj -> int

Comparison on the tags

module type Table = sig ... end

Hashcons tables

module MakeTable (HT : BatHashtbl.HashedType) : Table with type key = HT.t
module H : sig ... end

Hashing utilities

OCaml

Innovation. Community. Security.