anchor.diff:  ;;;;   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
   ;;;;   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
  -
  -;;; FA
  -;;;  -(states, tokens, edges, start, accept),
  -;;;    - edges: (list state-0 token state-1)
  -
  -;;; Representation opptions
  -;;; - transition matrix
  -;;; - transition hash table
  -;;; - edge list
  -;;; - successor array
  -
  -(defstruct (fa (:constructor %make-fa))
  -  states
  -  tokens
  -  edges
  -  start
  -  accept
  -  reject)
  -
  -(defun fa-state-name (fa i)
  -  (aref (fa-states fa) i))
  -(defun fa-token-name (fa i)
  -  (aref (fa-tokens fa) i))
  +;;; Utils
   
   (defun intersectionp (a b &optional (test #'eql))
     (cond
  
positive.code:     (fa-renumber fa :state-map state-map)))
  
  
  (defun fa-renumber (fa &key state-map token-map)
    "Reorder states and tokens in the FA.
  STATE-MAP: (aref state-map old-index) => (or new-index nil)
  TOKEN-MAP: (aref token-map old-index) => (or new-index nil)"
    (labels ((new-state (i)
               (if state-map
                   (aref state-map i)
  
negative.code:     (t (if (equal (car a) (car b))
             (symbol-list-compare (cdr a) (cdr b))
             (symbol-list-compare  (car a) (car b))))))
  
  
  ;;; FA
  ;;;  -(states, tokens, edges, start, accept),
  ;;;    - edges: (list state-0 token state-1)
  
  ;;; Representation opptions
  ;;; - transition matrix
  ;;; - transition hash table
  ;;; - edge list
  ;;; - successor array
  
  (defstruct (fa (:constructor %make-fa))
    states
    tokens
    edges
    start
    accept
    reject)
  
  (defun fa-state-name (fa i)
    (aref (fa-states fa) i))
  (defun fa-token-name (fa i)
    (aref (fa-tokens fa) i))
  
  (defun fa-map-edge-lists (result-type function fa)
    (map result-type function (fa-edges fa)))
  
  (defun fa-map-edges (result-type function fa)
    (fa-map-edge-lists result-type
                       (lambda (e) (funcall function (first e) (second e) (third e)))
                       fa))
  
  
  (defun fa-subset-indices (subset sequence)
    "return a list of indices of sequence elements that intersect with subset"
  