Created
July 29, 2017 19:35
-
-
Save saulshanabrook/c2723ab836dfb4eeb0ada8677fd451a2 to your computer and use it in GitHub Desktop.
clojure utils
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 map-vals-w-keys | |
"Takes each [k v] in map m and changes it to [k (f k v)] " | |
[f m] | |
(into {} | |
(for [[k v] m] | |
[k (f k v)]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment