[Openmcl-devel] (gethash '(0) foo)

R. Matthew Emerson rme at clozure.com
Thu Jul 7 06:39:31 PDT 2016


> On Jul 7, 2016, at 9:27 AM, Ron Garret <ron at flownet.com> wrote:
> 
> It’s you.  :-)
> 
> ? (eql '(0) '(0))
> NIL
> 
> You want an EQUAL hash table, not an EQL hash table.

That is to say, you should create your hash table with

(make-hash-table :test 'equal)

> On Jul 7, 2016, at 6:24 AM, Pierre Bessière <Pierre.Bessiere at imag.fr <mailto:Pierre.Bessiere at imag.fr>> wrote:
> 
>> Hi all :-)
>> 
>> Is it a bug ? or something I make wrong ?
>> 
>> ? (setf foo (make-hash-table))
>> #<HASH-TABLE :TEST EQL size 0/60 #x3020010FE25D>
>> ? (setf (gethash '(0) foo) 42)
>> 42
>> ? (gethash '(0) foo)
>> NIL
>> NIL

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20160707/04b52645/attachment.htm>


More information about the Openmcl-devel mailing list