                     (recur (mapcat #(.-children %) nodes)))))
   ISeqable
   (-seq [this]
-        (let [resukey-lt #js []]
-          (.into this resukey-lt)
-          (seq resukey-lt))))
+        (let [result #js []]
+          (.into this result)
+          (seq result))))
 
 (deftype Node [parent parent-ix keys vals children ^:mutable lower ^:mutable upper]
   Object
-  (into [this resukey-lt]
+  (into [this result]
         (dotimes [ix (alength keys)]
           (when-not (nil? children)
-            (.into (aget children ix) resukey-lt))
-          (apush resukey-lt #js [(aget keys ix) (aget vals ix)]))
+            (.into (aget children ix) result))
+          (apush result #js [(aget keys ix) (aget vals ix)]))
         (when-not (nil? children)
-          (.into (aget children (alength keys)) resukey-lt)))
+          (.into (aget children (alength keys)) result)))
   (seek [this key ix]
         (loop [lo (if (> ix 0) ix 0)
                hi (- (alength keys) 1)]

            [cemerick.double-check.properties :as prop :include-macros true]
            [cemerick.pprng :as pprng]
            clojure.set)
  (:require-macros [aurora.macros :refer [apush apush* key-lt key-lte key-gt key-gte set!! dofrom]]))

;; COMPARISONS


       :dissoc! (dissoc map (nth action 1))))
   map actions))

(defn run-building-prop [min-keys key-len actions]
  (let [tree (apply-to-tree (tree min-keys key-len) actions)
        sorted-map (apply-to-sorted-map (sorted-map-by compare-keys) actions)]
    (and (= (seq (map vec tree)) (seq sorted-map))
         (.valid! tree))))

(defn building-prop [gen key-len]
  (prop/for-all [min-keys gen/s-pos-int
                 actions (gen/vector (gen key-len))]
                (run-building-prop min-keys key-len actions)))

(defn run-lookup-prop [min-keys key-len actions action]
  (let [tree (apply-to-tree (tree min-keys key-len) actions)
        sorted-map (apply-to-sorted-map (sorted-map-by compare-keys) actions)
        tree-result (case (nth action 0)
                      :assoc! (.assoc! tree (nth action 1) (nth action 2))
                      :dissoc! (.dissoc! tree (nth action 1)))
        sorted-map-result (contains? sorted-map (nth action 1))]
    (= tree-result sorted-map-result)))

(defn lookup-prop [gen key-len]
  (prop/for-all [min-keys gen/s-pos-int
                 actions (gen/vector (gen key-len))
                 action (gen key-len)]
                (run-lookup-prop min-keys key-len actions action)))

(defn gen-next [key-len]
  (gen/make-gen
   (fn [rnd size]
     [[:next] nil])))

(defn gen-seek [key-len]
  (gen/make-gen
   (fn [rnd size]
     (let [key (make-simple-key rnd size key-len)]
       [[:seek key] nil]))))

(defn gen-movement [key-len]
  (gen/make-gen
   (fn [rnd size]
     (let [key (make-simple-key rnd size key-len)]
       (if (pprng/boolean rnd)
         [[:next] nil]
         [[:seek key] nil])))))
