anchor.diff:                       :direction :output
                        :if-exists :supersede
                        :element-type '(unsigned-byte 8))
  -  (loop FOR (type . fs) IN *f2*
  +  (loop FOR (type . fs) IN *f4*
       DO
       (multiple-value-bind (baseform yomi/hatu)
                            (case type 
  
positive.code:               (ldb (byte  6 42) n) (length yomi/hatu))
          (write-uint n 6 out))))
    'done)
      
negative.code:                          fs))))
               *f*)
      (nreverse fs)))
  
  (defparameter *f3*
    (let ((m (make-hash-table :test #'equal)))
      (maphash (lambda (k ms)
                 (loop FOR (_1 _2 baseform yomi hatuon) IN ms
                   DO
                   (let ((type (+ (if (string= k baseform) 1 0)
                                  (ash (if (string= yomi hatuon) 1 0) 1))))
                     (push (case type
                             (#b00 (list type baseform yomi hatuon))
                             (#b01 (list type yomi hatuon))
                             (#b10 (list type baseform yomi))
                             (#b11 (list type yomi)))
                           (gethash k m)))))
               *f*)
      (let ((acc '()))
        (maphash (lambda (k vs)
                   (push (list k vs) acc))
                 m)
        (mapcar #'second (sort acc #'string< :key #'first)))))
  
  
  ;; type:
  ;; b00# surface /= baseform and yomi /= hatuon
  