                      (when (val-lt new-hi (aget his ix))
                        (set!! changed? true)
                        (aset his ix new-hi))
-                     (when (val-lt (aget his ix) (aget los ix))
+                     ;; TODO need a better way to indicate failure
+                     (when (or (identical? greatest (aget los ix))
+                               (identical? least (aget his ix))
+                               (val-lt (aget his ix) (aget los ix)))
                        (set! failed? true))))
                  changed?))
   (split [this current]

             (set! los (.pop pushed-los))
             (set! his (.pop pushed-his))
             (set! depth (- depth 1))
             (let [splitter (.pop pushed-splitters)]
               (debug :backtracked los his splitter)
               (.write-bounds this splitter)
               (debug :splitting-right los his splitter)
               (.split-right (aget constraints splitter) (aget constraint->los splitter) (aget constraint->his splitter))
               (.read-bounds this splitter)
               (debug :split-right los his splitter)
               (set! failed? false)))
  (next [this]
        (debug :next los his pushed-los pushed-his)
        (loop [current 0

    (alength (time (iterator->keys j)))
  )

  (let [tree1 (tree 10)
      _ (.assoc! tree1 #js ["a" "b"] 0)
      _ (.assoc! tree1 #js ["b" "c"] 0)
      _ (.assoc! tree1 #js ["c" "d"] 0)
