         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
     )
 
+    (let [tree1 (tree 10)
+        _ (doseq [x [#js ["3" "4"]
+                     #js [-3 -4]
+                     ]]
+            (.assoc! tree1 x 0))
+        tree2 (tree 10)
+        _ (doseq [x [#js ["3" "4"]
+                     #js [-3 -4]
+                     ]]
+            (.assoc! tree2 x 0))
+        itr1 (magic-iterator tree1 #js [0 1 nil nil])
+        itr2 (magic-iterator tree2 #js [nil nil 0 1])
+        _ (.clear js/console)
+        join-itr (join-iterator #js [itr1 itr2])
+        ]
+;;     (assert
+;;      (= (map vec (all-join-results join-itr))
+;;         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
+
+      (all-join-results join-itr)
+    )
+
+
+    (let [tree1 (tree 10)
+        _ (doseq [x [#js ["1" "-5" "-5"]
+                     #js [1 -6 "-6"]
+                     #js ["-8" 2 "1"]
+                     ]]
+            (.assoc! tree1 x 0))
+        _ (.clear js/console)
+        itr1 (magic-iterator tree1 #js [0 1 2 nil nil nil])
+        itr2 (magic-iterator tree1 #js [nil nil nil 0 1 2])
+        join-itr (join-iterator #js [itr1 itr2])
+        ]
+;;     (assert
+;;      (= (map vec (all-join-results join-itr))
+;;         (map vec #js [#js [-3 -3] #js [-3 "3"]  #js ["3" -3] #js ["3" "3"] ])))
+
+      (alength (all-join-results join-itr))
+    )
+
   (let [tree1 (tree 10)
         _ (dotimes [i 10]
             (.assoc! tree1 #js [(js/Math.sin i) (js/Math.cos i) (js/Math.tan i)] i))

                   (.mark this cur)))

  (check-rewind [this key]
                (let [len (alength nil-ixs)]
                  (loop [ix 0]
                    (if (< ix len)
                      (let [cur (aget nil-ixs ix)
                            rewind? (not (identical? (aget key cur) (aget prev-seek cur)))]
                        (cond
                         ;; we can't store anything if we're at the root value, so just rewind if we need

                (.assoc! tree3 #js [(+ i 1) (+ i 2)] (* 2 i))))
          ]
      (time
       (dotimes [i 100]
         (let [itr1 (magic-iterator tree1 #js [0 1 2])
               itr2 (magic-iterator tree2 #js [0 nil 1])
               itr3 (magic-iterator tree3 #js [nil 0 1])
