[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Hash table mystery
From: |
Alex Shinn |
Subject: |
Re: [Chicken-users] Hash table mystery |
Date: |
Fri, 25 Jan 2008 01:31:02 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) |
>>>>> "JP" == Jean-Philippe Theberge <address@hidden> writes:
JP> (define BP (make-hash-table 500))
There's your problem. The parameters for MAKE-HASH-TABLE are:
(make-hash-table [eq-fn hash-fn init-size])
... so the first argument, if provided, should be a function to test
if two keys are equal (it defaults to EQUAL?).
The reason it doesn't signal an error right away is because if the
keys hash to different values, then they fall into fresh, empty
buckets and there's no other elements to compare against.
<hype>
Note that if you use scheme-complete.el and enable eldoc-mode, then
the above type signature for MAKE-HASH-TABLE would be shown in the
minibuffer as you were typing so you could see the mistake
immediately.
</hype>
--
Alex