          (ns-unmap *ns* '~tmp)
          (fn rook-map-traversal-dispatcher# [~req]
            [dispatch-map# endpoint-fns#]
-           (loop [pathvec#      (second (preparse-request ~req))
+           (loop [pathvec#      (second (request-route-spec ~req))
                   dispatch#     dispatch-map#
                   route-params# {}]
              (if-let [seg# (first pathvec#)]

  (pp/write form :dispatch pp/code-dispatch)
  (prn))

(defn preparse-request
  "Takes a Ring request map and returns [method pathvec], where method
  is a request method keyword and pathvec is a vector of path
  segments.

                                                  `apply-middleware-sync)]
       (emit-fn
         `(fn rook-dispatcher# [~req]
            (match (request-route-spec ~req)
              ~@(mapcat
                  (fn [[method pathvec verb-fn-sym middleware]]
                    (let [method           (if (identical? method :all)
