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


;; iteration

(defn -next-path [node path level]
  (let [idx (path-get path level)]
    (if (pos? level)
      ;; inner node


;; distance

(defn -distance [node ^long left ^long right ^long level]
  (let [idx-l (path-get left level)
        idx-r (path-get right level)]
    (if (pos? level)
