   clojure.lang.PersistentVector
   (to-tree-loc-matcher [selector-vec]
     (let [selector (map to-node-matcher selector-vec)]
-      (fn location-matcher [history-stack]
-        (matching-node selector history-stack))))
+      (fn location-matcher [node walker]
+        (let [history-stack (:history walker)]
+          (matching-node selector history-stack)))))
 
   ;; Match if the given function returns true.
   clojure.lang.IFn

;;; NOTE: all the dynamically created functions (from `fn`) in this
;;; module are given names to aid in debugging

(defn- span [p xs]
  ((juxt (partial take-while p)
         (partial drop-while p)) xs))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defprotocol NodeTransformer
  "Provides `to-visitor`, which adapt a 'transformer spec'
  to regular dalap visitor function."

  (to-visitor [spec]))
