       _ (.assoc! tree2 #js ["d" "c"] 0)
       _ (.assoc! tree2 #js ["b" "d"] 0)
       s (solver 4
-                #js [(contains (iterator tree1))
-                     (contains (iterator tree2))
-                     (function identity)]
-                #js [#js [0 1]
-                     #js [2 3]
-                     #js [1 3]])
+                #js [(contains (iterator tree1) #js [0 1])
+                     (contains (iterator tree2) #js [2 3])
+                     (function identity 1 #js [3])])
       ]
-  [(.next s) (.next s) (.next s) (.next s) (.next s)]
+    (.reset s)
+  (take 100 (take-while identity (repeatedly #(.next s))))
   )
 
   (let [tree1 (tree 10)

      _ (.assoc! tree2 #js ["d" "c"] 0)
      _ (.assoc! tree2 #js ["b" "d"] 0)
      s (solver 4
                #js [(contains (iterator tree1))
                     (contains (iterator tree2))
                     (equal)]
                #js [#js [0 1]
                     #js [2 3]
                     #js [1 3]])
      ]
  [(.next s) (.next s) (.next s) (.next s) (.next s)]
  )

 )

          (let [old-lo (aget los var)
                old-hi (aget his var)]
            (when-not (and (identical? old-lo new-val) (identical? old-hi new-val))
              (if (or (val-lt new-val old-lo) (val-lt old-hi new-val))
                (set! failed? true)
                (do
                  (aset los var new-val))
                  (aset his var new-val)
                  (.set-dirty this var)))))
  (set-watch [this var constraint value]
             (aset var->constraint->watching? (+ (* (alength constraints) var) constraint) value))
  (set-dirty [this var]
             (let [start (* (alength constraints) var)]
