I want to transform one map of values to another map with the same keys but with a function applied to the values. I would think there was a function for doing this in the c
Clojure 1.7 (released June 30, 2015) provides an elegant solution for this with update:
(defn map-function-on-map-vals [m f] (map #(update % 1 f) m)) (map-function-on-map-vals {:a "test" :b "testing"} #(.toUpperCase %)) ;; => ([:a "TEST"] [:b "TESTING"])