[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SRFI-1: suggestion for addition: LDIFF



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)