           right  (inc (-rpath (.-root set) (.-shift set)))]
       (iter set left right))))
 
-(deftype Iter [set left right keys idx]
+(deftype Iter [set ^long left ^long right keys ^long idx]
   #?@(:cljs [
     ISeqable
     (-seq [this] (when keys this))

    (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))
