   :route
   :function)
 
-(defn- first-if-one
-  "Returns the first value of a collection if there is only one element,
-  otherwise returns the collection."
-  [coll]
-  (if (rest coll)
-    coll
-    (first coll)))
-
 (defn- parse-key-value
   "Parse a key and value to make them more Clojure-friendly."
   [key val]
-  [(keyword key) (first-if-one (vec val))])
+  [(keyword key)
+   (if (rest val) val [(first val)])])
 
 (defn get-params
   "Creates a name/value map of all the request parameters."

           (java.net URL)
           (java.util Enumeration
                      Map$Entry)
           (javax.servlet ServletContext)
           (javax.servlet.http Cookie
                               HttpServlet

  (apply hash-map
    (mapcat #(list (keyword (.getName %)) (.getValue %))
             (.getCookies request))))

(defmacro handler-fn
  "Macro that wraps the body of a handler up in a standalone function."
