 (defn- matching-element [selector history]
   (first (select-element selector history)))
 
-(defn selector-visitor [selectors select-visit? visit-fn]
+(defn selector-visitor 
+  "Visitor middleware that will track all the elements on 
+  the dalap walk tree that matches the given selectors."
+  [selectors select-visit? visit-fn]
   (fn [elem w]
     (cond
       (not (select-visit? elem))

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

(defn flatten-selectors
  ([actions] (partition 2 (flatten-selectors () actions)))
  ([base actions]
    (match [actions]

      :else
        [elem new-history])))

(defn select-element 
  "Grabas an element from history that matches a group
  of selectors, respecting a heriarchy of multiple elements
  in between."
  [selectors history]
  (loop [current-history  history
         current-selector (first selectors)
         rest-selectors   (rest selectors)]
