 (defn prev-path
   "Returns path representing previous item before `path` in natural traversal order,
    or -1 if `path` was already beginning of a tree"
-  [^BTSet set path]
+  ^long [^BTSet set ^long path]
   (-prev-path (.-root set) path (.-shift set)))
 
 

    (iterator [this] (clojure.lang.SeqIterator. this))
  ]))

(defn iter [set left right]
  (Iter. set left right (keys-for set left) (path-get left 0)))

(defn iter-first [^Iter iter]


(declare riter-first riter-next riter-rseq)

(deftype ReverseIter [set ^long left ^long right keys ^long idx]
  #?@(:cljs [
    ISeqable
    (-seq [this] (when keys this))
