The HashConsInt structure
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
The `HashConsInt` structure

The `HashConsInt` structure embeds the `int` type as a hash-consed object. It is implemented by directly using the value as the tag and hash key (i.e., no hash table).

## Synopsis

    structure HashConsInt

## Interface

    type hash_key = int
    type obj = hash_key HashCons.obj

    val mk : hash_key -> obj

## Description

`type hash_key = int`

  The ground type being hashed.

`type obj = hash_key HashCons.obj`

  The type of hash-consed integers.

`val mk : hash_key -> obj`

  `mk n` converts the integer `n` to a hash-consed object.

## See Also

`HashCons`, The HashCons Library

SML/NJ Version 110.99.8 (April 25, 2025)
Last updated 2025-04-25 20:04:52 UTC