Created
October 16, 2013 14:05
-
-
Save Zariel/7008302 to your computer and use it in GitHub Desktop.
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- kvmap | |
[func hashmap] | |
(apply hash-map (flatten (map ((fn [[k v]] [k (func k v)])) hashmap)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example
input := { host: "http://localhost/" }
func := function(key, val) {
return val + key
}
output := { host: "http://localhost/host" }