                 (dotimes [x tuple-len]
                   (.push arr false))
                 arr)]
-    (loop [key start]
-      (when key
+    (loop [key start
+           i 10]
+      (when (and key (> i 0))
         (println "key: " key)
         (when (seek-all iterators len key)
           (->keys iterators keys len)
           (println keys)
           (find-least keys len tuple-len min-fill)
           (println "Min: " min-fill)
-          (recur (find-greatest iterators keys len results min-fill)))))
+          (recur (find-greatest iterators keys len results min-fill) (dec i)))))
     results
     ))
 

                    (< (typeof a) (typeof b)))
              bs
              as)))
        as))))

(defn fill! [as fill]
  (dotimes [ix (alength as)]

  fill)

(defn find-greatest [iterators keys len results min-fill]
  (loop [ix 0
         greatest (aget keys 0)
         found? true]
    (if (>= ix len)
      (if found?
        (let [root (aget iterators 0)]
          (.push results (fill! (.slice greatest 0) min-fill))
          (.next root)
          (.key root))
        (fill! (.slice greatest 0) min-fill))
      (let [comped (filled-key-compare greatest (aget keys ix) min-fill)
            comped-v (or comped greatest)]
        (println "greatest: " comped-v comped (and found? (not comped)))
        (recur (inc ix) comped-v (and found? (not comped)))))))



(defn seek-all [iterators len key]
  (loop [ix 0]
    (if (< ix len)
      (let [cur (aget iterators ix)
            cur-key (.key cur)]
        (when (key-lt (fill! (.slice cur-key 0) key) key)
          (.seek cur key))
        (when-not (.-iterator.end? cur)
          (recur (inc ix))))
      true)))

