     (when (symbol-for-function? f) ;it has to be a function all right
       f)))
 
-
 (defn- success?
   [{:keys [status]}]
   (<= 200 status 399))

  (l/debugf "Scanning %s for mappable functions" namespace)
  (->> (get-available-paths namespace)
       (map (fn [[[request-method path] fun]]
              (l/debugf "Mapping %s `%s' to %s" request-method path fun)
              [[request-method (clout/route-compile path)] fun]))
       (remove nil?)
       doall))

(defn namespace-handler
  "Helper handler, which wraps rook-handler in namespace middleware.

  The advanced version also takes a path for compojure.core/context and an optional list of sub-handlers that
  will be invoked BEFORE rook-handler."
  ([namespace]
   (namespace-middleware rook-handler namespace))
  ([path namespace & handlers]
   (compojure/context path []
                      (namespace-middleware
                        (if (empty? handlers)
                          rook-handler
                          (apply compojure/routes (concat handlers [rook-handler])))
                        namespace))))