anchor.diff:  
   (defun action (old-state old-direction)
     ;; return a list of dotted list (state . direction)
  -  (remove nil
  -          (mapcar (lambda (direction)
  -                    (move-blank old-state direction))
  -                  (remove (case old-direction
  -                            (UP 'DOWN)
  -                            (DOWN 'UP)
  -                            (RIGHT 'LEFT)
  -                            (LEFT 'RIGHT))
  -                          '(UP DOWN RIGHT LEFT)))
  -          :key #'car))
  +  (let ((pos-0 (position 0 old-state)))
  +    (mapcar (lambda (direction)
  +              (move-blank old-state pos-0 direction))
  +            (remove (case old-direction
  +                      (UP 'DOWN)
  +                      (DOWN 'UP)
  +                      (RIGHT 'LEFT)
  +                      (LEFT 'RIGHT))
  +                    (aref '#((   RIGHT DOWN) (LEFT    RIGHT DOWN) (LEFT    DOWN)
  +                             (UP RIGHT DOWN) (LEFT UP RIGHT DOWN) (LEFT UP DOWN)
  +                             (UP RIGHT     ) (LEFT UP RIGHT     ) (LEFT UP     ))
  +                          pos-0)))))
   
   (defun n-puzzle (search heuristic initial-state)
     (funcall search #'action heuristic #'goalp initial-state))
  
positive.code: (defun misplaced (state)
    (declare (special *target*))
    (loop for i from 0 to (1- (length state)) counting
          (/= (aref state i)
              (aref *target* i))))
  
  (defun swap (state i j)
    ;; move 0 at i to position j with side-effect.
  
negative.code:                    (debug 0)))
  
  (defstruct fringe
    (minimum 0 :type integer)
    (key #'identity :type function)
    (elements (make-array 1024 :fill-pointer 0 :adjustable t) :type array)
    (hash-elements (make-hash-table)))
  
  (defun fringe-existp (f item)
    (let ((elements (fringe-elements f))
  	(hash-elements (fringe-hash-elements f))
          (key (funcall (fringe-key f) item)))
      ;; No need to consider case `key<minimum`
      (unless (<= (fill-pointer elements) key)
        (gethash item hash-elements))))
  
  (defun fringe-remove (f)
    (let ((elements (fringe-elements f))
  	(hash-elements (fringe-hash-elements f))
  	(minimum (fringe-minimum f)))
      (loop while (null (aref elements minimum)) do
            (incf minimum 1))
  