user=> (let [a (array-map Double/NaN 1)] (assoc a (key (first a)) "foo")) {NaN 1, NaN "foo"} user=> (let [a (hash-map Double/NaN 1)] (assoc a (key (first a)) "foo")) {NaN "foo"}
方法:数组映射的比较跳过了身份检查,并且总是将调用委托给.equals调用。附带的补丁通过在委托给.equals之前进行适当的指针检查来使数组映射的行为与哈希映射保持一致。