 (extend-protocol p/Navigator
   PosNavigator
   (select* [this structure next-fn]
-    (if-not (empty? structure)
+    (if-not (fast-empty? structure)
       (next-fn ((.-getter this) structure))))
   (transform* [this structure next-fn]
-    (if (empty? structure)
+    (if (fast-empty? structure)
       structure
       ((.-updater this) structure next-fn))))
 

      (assoc v 0 (afn val))
      ))
  (update-last [v afn]
    (conj (pop v) (afn (peek v)))
    )
  #+clj Object #+cljs default
  (update-first [l val]
    (update-first-list l val))

    (last s)
    ))


(extend-protocol FastEmpty
  #+clj clojure.lang.PersistentVector #+cljs cljs.core/PersistentVector
  (fast-empty? [v]
    (= 0 (vec-count v)))
  #+clj Object #+cljs default
  (fast-empty? [s]
    (empty? s))
  )

(defn walk-until [pred on-match-fn structure]
  (if (pred structure)
    (on-match-fn structure)
