   (if (not= kw :next)
     (response-from (str kw))))
 
+(defmethod response-from IFn
+  [func]
+  func)
+
+;; Don't treat keywords, maps or vectors as functions
+(prefer-method response-from Keyword IFn)
+(prefer-method response-from Map IFn)
+(prefer-method response-from IPersistentVector IFn)
+
 (defmethod response-from nil
   [_]
   {})


(ns compojure.http.response
  (:use clojure.contrib.def)
  (:import clojure.lang.IPersistentVector)
  (:import java.util.Map)
  (:import clojure.lang.ISeq)

  "Create a new response map from a Clojure object, x."
  [x]
  (if-let [response (response-from x)]
    (merge-response default-response response)))
