     (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] 

;; The token that triggered a rule to fire.
(def ^:dynamic *rule-context* nil)

(declare print-memory)

(defn fire-rules* 
   "Fire rules for the given nodes."
   [rulebase nodes transient-memory transport]

           token (get-tokens memory node join-bindings)]
       (->Token (conj (:facts token) fact) (conj (:bindings token) bindings))))))

;; The NegationNode is a beta node in the Rete network that simply
;; negates the incoming tokens from its ancestors. It sends tokens
;; to its descendent only if the negated condition or join fails (is false).
(defrecord NegationNode [condition children binding-keys]
  ILeftActivate
  (left-activate [node join-bindings tokens memory transport]
