The ORD_KEY signature
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
The `ORD_KEY` signature

The `ORD_KEY` signature defines an interface to an abstract type of keys with a comparison function. This signature is used as the argument to various implementations of finite maps and sets.

## Synopsis

    signature ORD_KEY

## Interface

    type ord_key

    val compare : ord_key * ord_key -> order

## Description

`type ord_key`

  The abstract key type.

`val compare : ord_key * ord_key -> order`

  `compare (k1, k2)` returns the relation between the two keys. This function should define a total order on the `ord_key` type.

## See Also

`ORD_MAP`, `ORD_SET`, `GraphSCCFn`, The Util Library

SML/NJ Version 110.99.9 (November 4, 2025)
Last updated 2025-11-04 15:48:25 UTC