18.1. Modifying Hash Table Keys
Prev Chapter 18. Hash Tables Next

18.1. Modifying Hash Table Keys [sec_18-1-2]

If you "visibly modify" a key, consequences are unpredictable:

(LET ((hash-table (MAKE-HASH-TABLE :test 'EQUALP)))
 (SETF (GETHASH hash-table hash-table) T)
 (GETHASH hash-table hash-table))
⇒ NIL  ;
⇒ NIL 

because (SETF GETHASH) modifies hash-table, the very next GETHASH does not find it in itself.


These notes document CLISP version 2.49Last modified: 2010年07月07日




Chapter 18. Hash Tables Home 18.2. Function MAKE-HASH-TABLE

AltStyle によって変換されたページ (->オリジナル) /