Skip to content

Instantly share code, notes, and snippets.

@wilkes
Created August 26, 2009 14:36
Show Gist options
  • Save wilkes/175536 to your computer and use it in GitHub Desktop.
Save wilkes/175536 to your computer and use it in GitHub Desktop.
(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