How to find a maximal valued element in clojure hashmap? Assume there's a following hashmap:
{:a 1 :b 3 :c 4 :d 18 :e 9}
In this case we need :d as a result.
I guess it's your solution
(key (apply max-key val {:a 1 :b 3 :c 4 :d 18 :e 9}))
-> :d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With