         (assert (false? end?)) ;; have to be at a key to descend
         (assert (< key-ix (- (alength key-ix->intersection) 1)))
         (set! key-ix (+ key-ix 1))
+        (.maintain (aget key-ix->intersection key-ix))
         (let [iterator->present? (aget key-ix->iterator->present? key-ix)]
           (dotimes [i (alength iterator->present?)]
             (if (aget iterator->present? i)

    (.maintain trieterator)
    trieterator))

;; works on trees
(deftype Intersection [iterators ^:mutable end? key-len]
  Object
  (key [this]
       (when (false? end?)
         (.key (aget iterators 0))))
  (search [this current]
          (when (false? end?)
            (loop [current current]
              (let [max-key (.key (aget iterators (mod (- current 1) (alength iterators))))
                    min-key (.key (aget iterators current))]
                (when-not (key= min-key max-key)
                  (.seek (aget iterators current) max-key)
                  (if (true? (.-end? (aget iterators current)))
                    (set! end? true)

  (dc/quick-check 10000 (trie-tree-prop 1))
  (dc/quick-check 10000 (trie-tree-prop 2))
  (dc/quick-check 10000 (trie-tree-prop 3))
  (dc/quick-check 10000 (self-join-prop 1))
  (dc/quick-check 100 (self-join-prop 2))
  (dc/quick-check 100 (self-join-prop 3))

