chickadee » slset » slset-difference

slset-difference list_1 list_2 ...procedure

Returns the difference of the lists -- all the symbols of LIST_1 that do not occur in any of the other LIST_i parameters.

Symbols that are repeated multiple times in the LIST_1 parameter will occur multiple times in the result. The order in which symbols appear in the result is the same as they appear in LIST_1 -- that is, slset-difference essentially filters LIST_1, without disarranging symbol order. The result may share a common tail with LIST_1.

(slset-difference '(a b c d e) '(a e i o u)) => (b c d)

;; Repeated symbols in LIST1 are preserved.
(slset-difference '(a b b c x x d x i e) '(a e i o u) '() '(x x y z z)) => (b b c d)

(slset-difference '(a b c)) => (a b c) ; Trivial case