 
 (defn- can-edit [x y]
   (and (coercive-not= x nil) (coercive-not= y nil) (identical? x y)))
+
+(defn- inode-kv-reduce [arr kvs nodes f init]
+  (let [kv-len (* 2 kvs)
+        node-len (+ kv-len nodes)]
+    (loop [i 0 init init]
+      (cond (< i kv-len)
+            (let [init (f init (aget arr i) (aget arr (inc i)))]
+              (if (reduced? init)
+                @init
+                (recur (+ i 2) init)))
+            (< i node-len)
+            (let [init (.kv-reduce (aget arr i) f init)]
+              (if (reduced? init)
+                @init
+                (recur (inc i) init)))
+            :else init))))
 
 (deftype BitmapIndexedNode [edit ^:mutable datamap ^:mutable nodemap ^:mutable arr]
   Object

      (array-copy arr (inc idx-old) dst (+ idx-old 2) (- (alength arr) idx-old 1))
      (BitmapIndexedNode. e (bit-or datamap bit) (bit-xor nodemap bit) dst)))

  (single-kv? [_]
    (and (zero? nodemap) (== 1 (bit-count datamap))))


        ["assoc"
         (count hm1)
         (= (into #{} (vals hm1)) (into #{} (range times)))
         (= (reduce-kv #(conj %1 %3) #{} hm1) (into #{} (range times)))
         (= (into #{} (vals hm1)) (into #{} (map #(get hm1 (str "key" %)) (range times))))
         (= (keys hm1) (map (fn [[k v]] k) hm1))
         (= (reduce-kv #(conj %1 %2) #{} hm1) (into #{} (map #(str "key" %) (range times))))
         (= (into #{} (keys hm1)) (into #{} (map #(str "key" %) (range times))))])
      (let [subchan (/ times 2)
            dtimes (- times subchan)
