anchor.diff:     * all digits are replaced by 'N'
      * other characters are capitalized
     "
  -  (funcall fn phone (map 'string #'(lambda (c) (cond ((alpha-char-p c) #\A)
  -                                                     ((digit-char-p c) #\N)
  -                                                     (T c)))
  -                         (string-upcase phone))))
  -
  -(defun group-by (fn list)
  -  "fn -> [a] -> [[a]]
  -
  -   Groups equal adjacent elements of the list. Equality is checked with fn.
  +  (let ((pattern (map 'string #'(lambda (c) (cond ((alpha-char-p c) #\A)
  +                                                  ((digit-char-p c) #\N)
  +                                                  (T c)))
  +                      (string-upcase phone))))
  +    (funcall fn phone pattern)))
  +
  +(defun group-by (cmp list)
  +  "cmp -> [a] -> [[a]]
  +
  +   Groups equal adjacent elements of the list. Equality is checked with cmp.
     "
     (let ((buckets
              (reduce #'(lambda (buckets cur)
  -                       (cond ((null buckets) (cons (list cur) buckets))
  -                             ((funcall fn (caar buckets) cur)
  +                       (cond ((null buckets) (cons (list cur) nil))
  +                             ((funcall cmp (caar buckets) cur)
                                 (cons (cons cur (car buckets)) (cdr buckets)))
                                (T (cons (list cur) buckets))))
                      list :initial-value nil)))
  
positive.code: 
     This format follows https://en.wikipedia.org/wiki/List_of_postal_codes.
    "
    (funcall fn postcode (map 'string #'(lambda (c) (cond ((latin-char-p c) #\A)
                                                          ((digit-char-p c) #\N)
                                                          ((or (char= #\- c) (char= #\. c)) #\Space)
                                                          (T c)))
                              (string-upcase postcode))))
  
  
  (defun get-phone-or-flat-pattern (phone fn)
  
negative.code: 
  (defun starts-with (text prefix)
    "Returns non-nil if text starts with prefix."
    (and (>= (length text) (length prefix))
         (loop for u being the element of text
            for v being the element of prefix
            always (char= u v))))
  
  (defun get-postcode-pattern (postcode fn)
    "Simplifies postcode in the following way:
  