On Tue, 30 Sep 2003, Fabrizio Morbini wrote:
> The problem is: convert a list into a symbol that is in 1:1 corrispondence
> with the list. (because the list will be the key of an hash table, but a
> list cannot be a key of an hash table so I need to convert it into a
> symbol).
Ok... I think I see what you are trying to do. However,
you should know that lists CAN be used as keys to a hash
table, but just not by default. You need to tell the hash
table to use a different equality function.
Try this:
(setf *ht1* (make-hash-table :test 'equal))
(setf (gethash '(1) *ht1*) 'one)
(gethash '(1) *ht1*)
PS: If you will be putting lots of entries in, use ":size" to
provide a hint as to the final size.
harley.