Common Lisp the Language, 2nd Edition


next up previous contents index
Next: Arrays Up: Hash Tables Previous: Hash Table Functions

16.2. Primitive Hash Function

The function sxhash is a convenient tool for the user who needs to create more complicated hashed data structures than are provided by hash-table objects.


[Function]
sxhash object

sxhash computes a hash code for an object and returns the hash code as a non-negative fixnum. A property of sxhash is that (equal x y) implies (= (sxhash x) (sxhash y)).

The manner in which the hash code is computed is implementation-dependent but independent of the particular ``incarnation'' or ``core image.'' Hash values produced by sxhash may be written out to files, for example, and meaningfully read in again into an instance of the same implementation.


AI.Repository@cs.cmu.edu