title: How to parse URL parameters in Clojure?
body: <p>If I have the request <code>"size=3&amp;mean=1&amp;sd=3&amp;type=pdf&amp;distr=normal"</code> what's the idiomatic way of writing the function <code>(defn request-&gt;map [request] ...)</code> that takes this request and
  returns a map <code>{:size 3, :mean 1, :sd 3, :type pdf, :distr normal}</code></p>
  
  <p>Here is my attempt (using clojure.walk and clojure.string):</p>
  
  <pre><code>(defn request-to-map
     [request]
     (keywordize-keys
        (apply hash-map
               (split request #"(&amp;|=)"))))
  </code></pre>
  
  <p>I am interested in how others would solve this problem.</p>