title: Mapping a function on the values of a map in Clojure
body: <p>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 clojure api, but I have been unable to find it. </p>
  
  <p>Here's an example implementation of what I'm looking for</p>
  
  <pre><code>(defn map-function-on-map-vals [m f]
    (reduce (fn [altered-map [k v]] (assoc altered-map k (f v))) {} m))
  (println (map-function-on-map-vals {:a "test" :b "testing"} #(.toUpperCase %)))
  {:b TESTING, :a TEST}
  </code></pre>
  
  <p>Does anybody know if <code>map-function-on-map-vals</code> already exists? I would think it did (probably with a nicer name too).</p>