Figure 18–1 lists some defined names that are applicable to hash tables. The following rules apply to hash tables.
those whose keys are compared with equalp.
(setq a (make-hash-table)) ⇒ #<HASH-TABLE EQL 0/120 32536573> (setf (gethash 'color a) 'brown) ⇒ BROWN (setf (gethash 'name a) 'fred) ⇒ FRED (gethash 'color a) ⇒ BROWN, true (gethash 'name a) ⇒ FRED, true (gethash 'pointy a) ⇒ NIL, false
In this example, the symbols color and name are being used as
keys, and the symbols brown and fred are being used as the
associated values. The hash table
has two items in it, one of which
associates from color to brown, and the other of which
associates from name to fred.
clrhash hash-table-p remhash gethash make-hash-table sxhash hash-table-count maphash Figure 18–1: Hash-table defined names