(Previous discussion continued)
SRFI-1: suggestion for addition: LDIFF Will Fitzgerald 06 Jan 1999 17:23 UTC

SRFI-1: suggestion for addition: LDIFF Will Fitzgerald 06 Jan 1999 17:23 UTC

May I suggest the following addition to the SRFI-1 list library, Common Lisp's
LDIFF:

I think a reasonable definition is:

(define (ldiff l subl)
  (cond
   ((null? l) '())
   ((eq? (cdr l) subl) (list (car l)))
   (else (cons (car l)
	       (ldiff (cdr l) subl)))))

(I sent this as private email before, but am now sending it to the mailing list)