Created
May 10, 2015 09:20
-
-
Save escherize/764023fab0ac3be11440 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 log-response [callback] | |
(fn [response] | |
(.log js/console response) | |
(callback response))) | |
(get ) | |
(defn kw-map [m] | |
(zipmap (map keyword (keys m)) | |
(map (fn [v] (if (map? v) | |
(keywordize-map v) | |
v)) | |
(vals m)))) | |
user> (kw-map {"a" 1}) | |
{:a 1} | |
user> (kw-map {"a" 1 "b" {"b" "b"}}) | |
{:b {:b "b"}, :a 1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment