;This function takes as arguments two lists: sublist and mylist. ;It returns mylist with each item from sublist removed from it. (define removeListFromList (lambda (sublist mylist) (cond ((null? sublist) mylist) (else (set! mylist (rember (car sublist) mylist) ) (removeListFromList (cdr sublist) mylist) ) ) ) ) ;============== Unit Tests ====================== (load "atom.scm") (load "rember.scm") (load "test.scm") (define msg "removeListFromList") (test msg (removeListFromList '(a) '(a b c)) '(b c)) (test msg (removeListFromList '(a c) '(a b c)) '(b)) (test msg (removeListFromList '(c a b) '(a b c)) '()) (test msg (removeListFromList '(x) '(a b c)) '(a b c))