                     (rest (re-groups matcher)))))))
 
 (defn update-response!
-  "Update a HttpServletResponse via a Clojure datatype."
+  "Destructively update a HttpServletResponse via a Clojure datatype.
+     * FixNum        - updates status code
+     * map           - updates headers
+     * string or seq - updates body
+   Additionally, multiple updates can be chained through a vector.
+
+   e.g (update-response! \"Foo\")       ; write 'Foo' to response body
+       (update-response! [200 \"Bar\"]) ; set status to 200, and write 'Bar'"
   [#^HttpServletResponse response change]
   (cond 
     (string? change)

      (let [writer (. response (getWriter))]
        (doseq c change
          (. writer (print c))))
    (number? change)
      (. response (setStatus change))
    (map? change)
      (doseq [k v] change

  "Returns true if x is contained in coll, else false."
  [x coll]
  (some (partial = x) coll))

(defn re-escape
  "Escape all special regex chars in a string s."
