nameless_centurian
Gawd
- Joined
- Apr 4, 2003
- Messages
- 836
i need to add distinct pairs to a hashtable and associate a value with them.
let's say we have x, y, and z. each of {x,y} {x,z} {y,z} is what i need to store and associate a value with.
i have tried this:
i have also tried
when i
and when i
the result is the same. i get NIL. do you have any insight?
edit: is it possible that my insertion is inserting a LISP object '('x 'y) into the table and when i search for it with gethash that i am searching for another new LISP object that happens to have the same attributes? is this why i get NIL? if so, how do i step around this?
let's say we have x, y, and z. each of {x,y} {x,z} {y,z} is what i need to store and associate a value with.
i have tried this:
Code:
(setf (gethash '('x . 'y) sometable) 1.2)
i have also tried
Code:
(setf (gethash '('x 'y) sometable) 1.2)
when i
Code:
(gethash '('x . 'y) sometable)
and when i
Code:
(gethash '('x 'y) sometable)
the result is the same. i get NIL. do you have any insight?
edit: is it possible that my insertion is inserting a LISP object '('x 'y) into the table and when i search for it with gethash that i am searching for another new LISP object that happens to have the same attributes? is this why i get NIL? if so, how do i step around this?