anchor.diff:  (defun insert (x list &key (test #'<))
     "Inserts X before the first element in LIST which is greater than X.
   The order relation can be specified by the keyword TEST"
  -  (multiple-value-bind (lt ge) (span (curry (flip test) x) list)
  -    (nconc lt (cons x ge))))
  +  (when (and (listp list) (functionp test))
  +    (multiple-value-bind (lt ge) (span (curry (flip test) x) list)
  +      (nconc lt (cons x ge)))))
   
   (defun replicate (n x)
     "Returns a list contaning N times the value X"
  
positive.code:   "Applied to PREDICATE and LIST, returns two values: a list
  containing all the elements from LIST that satisfy PREDICATE, and its
  complementary list."
    (when (and (functionp predicate) (consp list))
      (let* ((result1 (cons nil nil))
             (result2 (cons nil nil))
             (splice1 result1)
  
negative.code: (defun take-while (predicate list)
    "Applied to PREDICATE and LIST, returns a list containing elements
  from the front of LIST while PREDICATE is satisfied."
    (when (and (functionp predicate) (listp list))
      (let ((result (cons nil nil)))
        (do ((list list (rest list))
             (splice result (rest (rplacd splice
  