Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在clojure hashmap中找到最大值元素?假设有以下哈希图:
{:a 1 :b 3 :c 4 :d 18 :e 9}
在这种情况下,我们需要 :d 作为结果。
我想这是你的解决方案
(key (apply max-key val {:a 1 :b 3 :c 4 :d 18 :e 9})) -> :d