     ;; The returned production node will be the child of a join node built as we
     ;; work our way back up the recursion stack.
     nil [production-node alpha-roots]))
-
 
 (defn- node-id [node]
   (->> node


  (description [node] (str "TestNode -- " (:text test))))

;;
(defrecord Accumulator [result-binding input-condition initial-value reduce-fn combine-fn convert-return-fn])

(defn- retract-accumulated [node accumulator token result fact-bindings transport memory]
  (let [converted-result ((get-in accumulator [:definition :convert-return-fn]) result)
        new-facts (conj (:facts token) converted-result)
        new-bindings (merge (:bindings token) 

    (remove-elements! memory node elements join-bindings) ;; FIXME: elements must be zero to retract.
    (send-tokens transport memory children (get-tokens memory node join-bindings))))

;; The test node represents a Rete extension in which 
(defrecord TestNode [test children]
  ILeftActivate
  (left-activate [node join-bindings tokens memory transport] 
