anchor.diff:    (path-cost 0)
     (depth 0))
   
  -(defun expand (heuristic successor node fringe)
  -  (mapcar (lambda (direction-state-cost)
  -            (let ((direction (aref direction-state-cost 0))
  -                  (state (aref direction-state-cost 1))
  -                  (cost (aref direction-state-cost 2))
  -                  (depth (node-depth node)))
  -              (make-node :state state
  -                         :parent node
  -                         :direction direction
  -                         :path-cost (+ depth cost)
  -                         :depth (1+ depth))))
  -          (remove-if (lambda (temp-triple)
  -                       (find (aref temp-triple 1) (fringe-elements fringe) :key #'node-state :test #'equal))
  -                     (funcall successor heuristic (node-state node) (node-direction node)))))
  -
   (defun direction-sequence (node)
     (labels ((direction-sequence-iter (node directions)
                (if (null (node-parent node))
  
positive.code:                (direction-sequence-iter (node-parent node) (cons (node-direction node) directions)))))
      (direction-sequence-iter node nil)))
  
  (defun A*-search (heuristic fringe successor goalp)
    (let ((node (fringe-remove fringe)))
      (if (funcall goalp (node-state node))
          (list (direction-sequence node) (node-depth node))
        (A*-search heuristic
                   (fringe-insert fringe (expand heuristic successor node fringe))
                   successor
                   goalp))))
  
  (defun tree-search (search successor heuristic goalp initial-state)
    (funcall search
             heuristic
             (fringe-insert (make-fringe :key #'node-path-cost) (list (make-node :state initial-state)))
             successor
             goalp))
  
  (defun manhattan (state)
    (declare (special *target*
  
negative.code: 
  (defstruct fringe
    (key #'identity)
    (elements (make-heap)))
  
  (defun fringe-remove (q)
    (heap-pop (fringe-elements q) (fringe-key q)))
  