anchor.diff:  
   (defun A*-search (action heuristic goalp initial-state)
     (labels ((expand (node fringe)
  -             (remove-if (lambda (new-node)
  -                          (fringe-existp fringe new-node))
  -                        (mapcar (lambda (triple)
  -                                  (let* ((state (aref triple 0))
  -                                         (direction (aref triple 1))
  -                                         (cost (funcall heuristic state))
  -                                         (depth (1+ (node-depth node)))
  -                                         (pos-0 (aref triple 2)))
  -                                    (make-node :state state
  -                                               :parent node
  -                                               :direction direction
  -                                               :path-cost (+ depth cost)
  -                                               :depth depth
  -                                               :pos-0 pos-0)))
  +             (mapcar (lambda (triple)
  +                       (let* ((state (aref triple 0))
  +                              (direction (aref triple 1))
  +                              (cost (funcall heuristic state))
  +                              (depth (1+ (node-depth node)))
  +                              (pos-0 (aref triple 2)))
  +                         (make-node :state state
  +                                    :parent node
  +                                    :direction direction
  +                                    :path-cost (+ depth cost)
  +                                    :depth depth
  +                                    :pos-0 pos-0)))
  +                     (remove-if (lambda (triple)
  +                                  (let ((state (aref triple 0)))
  +                                    (fringe-exist-state-p fringe state)))
                                   (funcall action node))))
              (search-iter (fringe)
                (let ((node (fringe-remove fringe)))
                  (if (funcall goalp (node-state node))
                      (list (direction-sequence node) (node-depth node))
                    (search-iter (fringe-insert fringe (expand node fringe)))))))
  -    (search-iter (fringe-insert (make-fringe :key #'node-path-cost)
  +    (search-iter (fringe-insert (make-fringe :state #'node-state
  +                                             :key #'node-path-cost)
                                   (list (make-node :state initial-state
                                                    :path-cost (funcall heuristic initial-state)
                                                    :pos-0 (position 0 initial-state)))))))
  
positive.code:                             (LEFT 'RIGHT))
                            '(UP DOWN RIGHT LEFT))))))
  
  
  (defun n-puzzle (search heuristic initial-state)
    (funcall search #'action heuristic #'goalp initial-state))
  
  
negative.code:   (mapc (lambda (item)
            (let ((elements (fringe-elements f))
  		(hash-elements (fringe-hash-elements f))
  		(key (funcall (fringe-key f) item))
                  (state (funcall (fringe-state f) item)))
              (loop for i from (fill-pointer elements) to key do
                    (vector-push-extend nil elements))
              (push item (aref elements key))
  	    (push t (gethash state hash-elements))))
          items)
    f)
  
  