package batteries

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

Install

Dune Dependency

Authors

Maintainers

Sources

v3.9.0.tar.gz
md5=ea26b5c72e6731e59d856626049cca4d
sha512=55975b62c26f6db77433a3ac31f97af609fc6789bb62ac38b267249c78fd44ff37fe81901f1cf560857b9493a6046dd37b0d1c0234c66bd59e52843aac3ce6cb

doc/batteries.unthreaded/BatHashtbl/module-type-HashedType/index.html

Module type BatHashtbl.HashedTypeSource

Sourcetype t

The type of the hashtable keys.

Sourceval equal : t -> t -> bool

The equality predicate used to compare keys.

Sourceval hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include ((=), Hashtbl.hash) for comparing objects by structure, ((fun x y -> compare x y = 0), Hashtbl.hash) for comparing objects by structure and handling Pervasives.nan correctly, and ((==), Hashtbl.hash) for comparing objects by addresses (e.g. for cyclic keys).

OCaml

Innovation. Community. Security.