alice
library
manual.

Alice Project

The HASHABLE signature


________ Synopsis ____________________________________________________

    signature HASHABLE
  

An abstract signature for types that support hashing, useful for functor arguments. Note that most basic types in the fundamental library match this signature.

See also: ORDERED


________ Import ______________________________________________________

    import signature HASHABLE from "x-alice:/lib/data/HASHABLE-sig"

________ Interface ___________________________________________________

    signature HASHABLE =
    sig
	type t

	val equal :  t * t -> bool
	val hash :   t -> int
    end
  

________ Description _________________________________________________

type t

The abstract type of hashable values.

equal (x1, x2)

Returns true if x1 and x2 are equal, false otherwise.

hash x

Maps x to an integer suitable as a hash value.



last modified 2007/Mar/30 17:10