+
+
+(defun delete-collect-if (predicate seq)
+ (let ((head (cons nil seq)))
+ (values
+ (loop
+ for tmp on head
+ while (cdr tmp)
+ when (funcall predicate (second tmp))
+ collect (let ((elm (second tmp)))
+ (setf (cdr tmp) (cddr tmp))
+ elm))
+ (cdr head))))