             (make-recursive-expander 
              (delay (make-exhaustive-search 
                      (make-abstracted-incremental-dijkstra-sa-search state reward f))) r)))
-     (make-goal-node state))
+     (GoalNode state))
    reward])
 
 

  (expand-node        [se new-threshold]
    "Returns PartialResult of SearchNodes."))

(defn make-goal-node [goal-state]
  (reify SearchNode
       (extract-goal-state [] goal-state)
       (expand-node        [min-reward] (throw (UnsupportedOperationException.)))))

;; Named node is simple non-terminal node whose equality semantics are given by name.
(deftype NamedNode [name root-sa expand-fn] :as this

            (if (< @index-atom (count @result-vec-atom))
                (let [[_ rew :as result] (nth @result-vec-atom @index-atom)]
                 ;; TODO: remove
;                  (util/assert-is (<= (count @result-vec-atom) 1) "%s" [@result-vec-atom])
                  (if (>= rew min-reward)
                      (do (swap! index-atom inc) 
                          (PartialResult [result] 
