anchor.diff:  (assert (equal (halves '(x)) '(x)))
   (assert (equal (multiple-value-list (halves '(x y))) '((x) (y))))
   (assert (equal (multiple-value-list (halves '(x y z))) '((x y) (z))))
  +
  +(defun dsu-sort (seq fn &key (key #'identity))
  +  "Decorate-sort-undecorate using KEY.
  +Useful when KEY is an expensive function (e.g. database access)."
  +  (fbind (key)
  +    (map-into seq
  +              #'cdr
  +              ;; Vectors sort faster.
  +              (sort (map 'vector
  +                         (lambda (item)
  +                           (cons (key item) item))
  +                         seq)
  +                    fn
  +                    :key #'car))))
  
positive.code: 
  (assert (equal (gcs '("how" "now")) "ow"))
  
  (defun length< (seq n)
    "Is SEQ less than N elements long?"
    (check-type n array-length)
    (etypecase seq
      (list (nlet len< ((list seq)
                        (n n))
              (cond ((zerop n) nil)
                    ((endp list) t)
                    (t (len< (rest list) (1- n))))))
      (sequence (< (length seq) n))))
  
  (assert (length< '(1) 2))
  (assert (not (length< '(1 2) 2)))
  (assert (not (length< '(1 2 3) 2)))
  
  (defun length> (seq n)
    "Is SEQ more than N elements long?"
    (etypecase seq
      (list (nlet len> ((list seq)
                        (n n))
              (cond ((endp list) nil)
                    ((zerop n) t)
                    (t (len> (rest list) (1- n))))))
      (sequence (> (length seq) n))))
  
  (assert (not (length> '(1) 2)))
  (assert (not (length> '(1 2) 2)))
  (assert (length> '(1 2 3) 2))
  
  (defun length>= (seq n)
    "Is SEQ at least N elements long?"
    (not (length< seq n)))
  
  (defun length<= (seq n)
    "Is SEQ no more than N elements long?"
    (not (length> seq n)))
  
  (defun longer (x y)
    "Return the longer of X and Y.
  
negative.code:           slice
            vector=
            take drop
            halves
            dsu-sort))
  
  (export '(split-sequence:split-sequence
            split-sequence:split-sequence-if
  