Skip to content

Instantly share code, notes, and snippets.

@escherize
Created May 10, 2015 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save escherize/764023fab0ac3be11440 to your computer and use it in GitHub Desktop.
Save escherize/764023fab0ac3be11440 to your computer and use it in GitHub Desktop.
(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