anchor.diff:      (loop with stats = (loop for style across (styles town)
                                collect (cons style 0))
             for i in (population town)
  -          do (incf (cdr (assoc i stats)))
  +          do (incf (cdr (assoc (styles i) stats)))
             finally (return stats)))
     (:method ((town delayed-town))
       (call-next-method
  
positive.code:     (loop with stats = (loop for style across (styles town) collect (cons style 0))
            with population = (population town)
            for i from 1 to (visibility town)
            for sample = (nth (random (length population)) population)
            do (incf (cdr (assoc sample stats)))
            finally (return stats))))
            
  
  (defgeneric survey (town)
    (:documentation "Counts what styles the inhabitant sees.")
  
negative.code:           collect (cons style (nbutlast (sort i #'< :key #'cdr)
                                          (ceiling (/ (length style-list) 2)))))))
  
  (defun select-style (style style-alist)
    (let ((style-alist (cdr (assoc style style-alist))))
      (car (nth (random (length style-alist)) style-alist))))
  
  (defgeneric deconform (town)
    (:documentation "Simulates the selection of styles of all hipsters.
  In this case, they will attempt at random any style on the less popular half of the style.")
    (:method ((town town-snapshot))
      (let ((candidate-styles (survey town)))
        (mapc #'(lambda (style-of-self)
                  (setf (styles style-of-self)
                        (cond
                          ((true-with-probability (hipsterish-tendency town))
                           (select-style (styles style-of-self) candidate-styles))
                          ((true-with-probability 10/11) (styles style-of-self))
                          (t (aref (styles town) (random (length (styles town))))))))
              (population town))))
    (:method ((town delayed-town))
      (if (numberp (aref (town-history town) (mod (1+ (ticks town)) (period town))))
          (mapc 
           ;; While the history fills up, randomly wander, changing fashions 1/6 of the time
           #'(lambda (style-of-self)
               (setf (styles style-of-self)
                     (if (true-with-probability 1/6)
                         (aref (styles town) (random (length (styles town))))
                         (styles style-of-self))))
           (population town))
          (let ((candidate-styles (survey town)))
            (mapc
             ;; After that, proceed as normal
             #'(lambda (style-of-self)
                 (setf (styles style-of-self)
                       (cond
                         ((true-with-probability (hipsterish-tendency town))
                          (select-style (styles style-of-self) candidate-styles))
                         ((true-with-probability 10/11) (styles style-of-self))
                         (t (aref (styles town) (random (length (styles town))))))))
             (population town))))))
            
  (defgeneric tick! (town)
    (:documentation "Destructively modifies a snapshot to become the next iteration of the simulation.")
    (:method ((town town-snapshot))
      (deconform town)
      (incf (ticks town)))
    (:method :after ((town delayed-town))
      (setf (aref (town-history town) (mod (ticks town) (period town))) (population town))))
  