anchor.diff:  (assert
    (set-equal
     (let ((ngrams '()))
  -    (map-ngrams (lambda (ngram) (push ngram 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_")
  
positive.code:                      ;; 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))))
                           ;; Ignore the trivial ngram "_".
                           (unless (equal ngram "_")
                             (prog1 nil
                               (funcall fn ngram)))))))
                (declare (dynamic-extent (function get-ngram)))
                (tagbody (case len
                           (1 (go :1))
  
negative.code:   (prog1 lm
      (dolist (token (tokens input))
        (map-ngrams
         (lambda (word start end)
           (let ((ngram (subseq word start end)))
             (incf (gethash ngram lm 0))))
         token))))
  
  (defun map-ngrams (fn token)
  