anchor.diff:    (labels ((expand (node fringe)
                (remove-if (lambda (new-node)
                             (fringe-existp fringe new-node))
  -                        (mapcar (lambda (state-direction)
  -                                  (let* ((state (car state-direction))
  -                                         (direction (cdr state-direction))
  +                        (mapcar (lambda (triple)
  +                                  (let* ((state (aref triple 0))
  +                                         (direction (aref triple 1))
                                            (cost (funcall heuristic state))
  -                                         (depth (1+ (node-depth node))))
  +                                         (depth (1+ (node-depth node)))
  +                                         (pos-0 (aref triple 2)))
                                       (make-node :state state
                                                  :parent node
                                                  :direction direction
                                                  :path-cost (+ depth cost)
  -                                               :depth depth)))
  -                                (funcall action (node-state node) (node-direction node)))))
  +                                               :depth depth
  +                                               :pos-0 pos-0)))
  +                                (funcall action node))))
              (search-iter (fringe)
                (let ((node (fringe-remove fringe)))
                  (if (funcall goalp (node-state node))
  
positive.code: 
  (format t "IDA*-search~%")
  (time (format t "~A~%" (n-puzzle #'IDA*-search
                                   #'manhattan
                                   *start*)))
  
  (format t "A*-search~%")
  (time (format t "~A~%" (n-puzzle #'A*-search
                                   #'manhattan
                                   *start*)))
  
negative.code:       (rotatef (aref temp-state i) (aref temp-state j))
        temp-state)))
  
  (defun move-blank (state direction pos-0)
    (declare (special *width*))
    (case direction
      (UP
       (let ((new-pos-0 (- pos-0 *width*)))
         (when (>= new-pos-0 0)
           (vector (swap state pos-0 new-pos-0) direction new-pos-0))))
      (DOWN
       (let ((new-pos-0 (+ pos-0 *width*)))
         (when (< new-pos-0 (length state))
           (vector (swap state pos-0 new-pos-0) direction new-pos-0))))
      (LEFT
       (let ((new-pos-0 (1- pos-0)))
         (unless (zerop (mod pos-0 *width*))
           (vector (swap state pos-0 new-pos-0) direction new-pos-0))))
      (RIGHT
       (let ((new-pos-0 (1+ pos-0)))
         (unless (zerop (mod (1+ pos-0) *width*))
           (vector (swap state pos-0 new-pos-0) direction new-pos-0))))))
  
  (defparameter *width* 3)
  
  