             (set! end? true)
             (.search this 1)))))
 
-;; TODO treeterator (key-ix->take?)
+;; TODO treeterator (key-ix->needed? , key-ix->produced?)
 
 (defn intersection [iterators]
   (if (> (alength iterators) 1)

          (.seek (aget key-ix->intersection key-ix) key)
          (.maintain this)))
  (down [this]
        (assert (< key-ix (- (alength key-ix->iterators) 1)))
        (set! key-ix (+ key-ix 1))
        (let [iterator->present? (aget key-ix->iterator->present? key-ix)]
          (dotimes [i (alength iterator->present?)]

      (.next iterator))
    results))

(deftype Join [^:mutable key-ix iterators key-ix->intersection key-ix->iterator->present? ^:mutable end?]
  Object
  (key [this]
       (when (false? end?)
