This is a Library for generic hash tables.
The interface is specified in CDR2 http://cdr.eurolisp.org/document/2/
This is currently in version 1.4, with MAP-GENERIC-HASH and WITH-GENERIC-HASH-TABLE-ITERATOR added. Still no LOOP path, though. There is, however, a pair of functions for hash tables using vectors of strings as keys.
Generic hash table implementation. This implementation is in the public domain.
This package defines four generic functions and two normal functions. The non-generic function MAKE-GENERIC-HASH-TABLE is used for hash table creation.
(make-generic-hash-table (:test 'eql) (:size 17))
If this function is fed the *symbols* EQ, EQL, EQUAL or EQUALP as test it will create a generic hash table with that as an equality test and SXHASH as the hash function.
If this function is fed the *functions* EQ, EQL, EQUAL or EQUALP it will create a normal (built-in) hash table with that as a test function.
(register-test-designator nickname hash-fn equal-fn)
Register a new generic hash function with nickname as the relevant :test parameter.
The generic functions are:
(hashref key table &optional (default nil))
This function does essentially the same thing as GETHASH.
((setf hashref) value key table &optional ignore)
For (setf (hashref ...) ...)
(map-generic-hash fn table)
As MAPHASH
(hashrem key table)
As REMHASH
These functions dispatch somewhat differently depending on if they're fed a generic hash table or a built-in hash table.
Download ASDF package from http://src.hexapodia.net/genhash.tar.gz
There's a tiny shim from GENHASH to CMUCL's native user-defined hash-tables at http://rydis.se:11147/src/genhash-shim.lisp.
This page is linked from: CDR ingvar
CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively