anchor.diff:    "Defines a new query identified by the symbol NAME."
     `(define-query ,name ',body))
   
  +;;; Queries fired by RETRIEVE collect their results in the special variable
  +;;; *QUERY-RESULT*. As an example, one firing of this query, 
  +;;;
  +;;;   (retrieve (?x ?y) 
  +;;;     (?x (rocky (name ?name)))
  +;;;     (?y (hobbit (name ?name))))
  +;;;
  +;;; will produce a result similar to,
  +;;;
  +;;; (((?X . #<ROCKY @ #x7147b70a>) (?Y . #<HOBBIT @ #x7147b722>)))
  +
   (defmacro retrieve ((&rest varlist) &body body)
     "Issues a query against the knowledge base. First, the query body is
     normalized to produce a hash code. Next, the cache is checked to see if the
     query already exists; if it doesn't, then a new query (rule) is created,
  -  cached and added to the rete network. Finally, the query is run."
  +  cached and added to the rete network. Finally, the query is run. Query
  +  results are collected into the variable *QUERY-RESULT* as the query rules
  +  fire. Each individual rule firing produces a list of CONS cells; for each
  +  cell, its CAR is a variable as found in VARLIST and its CDR is that
  +  variable's pattern binding. RETRIEVE returns two values; the value of
  +  *QUERY-RESULT* and the name of the rule implementing the query."
     (flet ((make-query-binding (var)
              `(cons ',var (instance-of-shadow-fact ,var))))
       (let ((query-name (gensym))
  
positive.code: (defmethod clear-engine :after ((self rete))
    "Removes all queries from *QUERY-MAP* whenever an inference engine is
    CLEARed."
    (forget-all-queries))
  
  (defun find-query (hash)
    "Looks up a query name in the local query table *QUERY-MAP*, indexed by
  
negative.code:                      *query-result*)))
             (remember-query ,hash ,query))
           (run-query ,query)))))
  
  (defun forget-query (name)
    "Discards a query from the cache by 1) removing it from *QUERY-MAP*; and 2)
  