anchor.diff:                       ;; Ignore ngrams that line up with either end of
                        ;; the word, but don't have the space attached.
                        (unless (or (= i 1) (= j (1- len)))
  -                       (let ((ngram (subseq word i (+ i j))))
  +                       (let ((start i)
  +                             (end (+ i j)))
  +                         (declare (type array-index end))
                            ;; Ignore the trivial ngram "_".
  -                         (unless (equal ngram "_")
  -                           (prog1 nil
  -                             (funcall fn ngram)))))))
  +                         (unless (and (= 1 (- end start))
  +                                      (char= (aref word start) #\_))
  +                           (funcall fn word start end)
  +                           ;; Satisfy SBCL about the return type.
  +                           nil)))))
                 (declare (dynamic-extent (function get-ngram)))
                 (tagbody (case len
                            (1 (go :1))
  
positive.code:   (prog1 lm
      (dolist (token (tokens input))
        (map-ngrams
         (lambda (ngram)
           (incf (gethash ngram lm 0)))
         token))))
  
  (defun map-ngrams (fn token)
  
negative.code: (assert
   (set-equal
    (let ((ngrams '()))
      (map-ngrams (lambda (word start end)
                    (let ((ngram (subseq word start end)))
                      (push ngram ngrams)))
                  "corpus")
      ngrams)
    (split-sequence #\Space "_c _co _cor _corp o or orp orpu r rp rpu rpus_ p pu pus_ u us_ s_")
  