I have a map m, a key k and a function f. Is it possible to rewrite this code simpler?
m
k
f
(assoc m k (f (get m k))
Try clojure.core/update-in
(update-in m [k] f)
Edit: Clojure 1.7 introduced clojure.core/update
(update m k f)