Created
August 30, 2011 11:42
-
-
Save kapilreddy/1180721 to your computer and use it in GitHub Desktop.
generate query string from 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 [query-map] | |
(str "?" (apply str (map name (flatten (interpose :& (map #(interpose "=" %) (seq query-map)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment