• OCaml logo OCaml logo
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Get started
  • spin
  • Documentation
  • spin.std lib
  • Spin_std .Hashtbl .Make .H Parameter #1
package spin
  • spin
    • Spin
      • Config
      • Dec_common
        • Git_repo
          • Errors
        • Make_valid_string
          • 1-M
          • Errors
        • Source
        • Template_name
          • Errors
      • Dec_project
        • Config
          • Errors
      • Dec_template
        • Actions
        • Base_template
          • Errors
        • Configuration
        • Description
        • Example_command
        • Example_commands
        • Expr
        • Ignore_rule
        • Parse_binaries
        • Raw_files
      • Dec_user_config
      • Decoder
        • Infix
        • Syntax
      • Encoder
      • File_generator
      • Git_template
      • Helpers
      • Local_template
      • Official_template
      • Pp
      • Refmt
      • Spawn
      • Spin_error
      • Template
      • Template_actions
      • Template_configuration
      • Template_expr
      • User_config
  • spin.ansi
    • Ansi
  • spin.inquire
    • Inquire
      • Style
  • spin.std
    • Spin_std
      • Filename
      • Glob
      • Hashtbl
        • HashedType
        • Make
          • 1-H
        • MakeSeeded
          • 1-H
        • S
        • SeededHashedType
        • SeededS
      • List
      • Result
        • List
        • Syntax
      • Spawn
      • String
      • Sys
        • Immediate64
          • Immediate
          • Make
            • 1-Immediate
            • 2-Non_immediate
          • Non_immediate
  • spin.template
    • Spin_template
      • Template
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val 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

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).

Footer

OCaml

Innovation. Community. Security.

GitHub Discord Twitter Peertube RSS

About Us

  • Industrial Users
  • Academic Users
  • Why OCaml

Resources

  • Get Started
  • Language Docs
  • Books
  • Releases

Community

  • Blog
  • Jobs

Policies

  • Carbon Footprint
  • Governance
  • Privacy
  • Code of Conduct