Closed dpsutton closed 7 years ago
I'd prefer to use clojure.lang.Util/hash
rather than the "some" check .
ah. didn't know about that one. Worked like a charm. Updated @ztellman
Also, can add a test if you would like but it's not particularly complicated. Up to you
No test required, thanks for the report and fix.
Several alternatives were tried: if you put the whole unchecked-add if an
(if (and k v) (unchecked-add ...) 0)
then you get a hashvalue of 0 when there is only one key and a missing value as the key isn't hashed. If you(unchecked-add acc (bit-xor (.hashCode (or k 0)) ..
then you end up with reflection warnings.