Created
August 26, 2009 14:36
-
-
Save wilkes/175536 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 parse-qs [qs] | |
(let [split (fn [s v] (seq (.split s v))) | |
pairs (split qs "&") | |
parse-pair (fn [p] (map url-decode (split p "=")))] | |
(apply hash-map (mapcat parse-pair pairs)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment