Created
June 13, 2011 21:47
-
-
Save bdesham/1023802 to your computer and use it in GitHub Desktop.
Calling a function on the values in a map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn modify-vals | |
[f m] | |
(zipmap | |
(keys m) | |
(for [item (vals m)] (f item)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better:
Thanks to amalloy in #clojure.