@result{} nil
@end group
@group
-(setq l (make-list 3 '(a b))
+(setq l (make-list 3 '(a b)))
@result{} ((a b) (a b) (a b))
(eq (car l) (cadr l))
@result{} t
@quotation
@b{Common Lisp note:} Common Lisp has functions @code{union} (which
avoids duplicate elements) and @code{intersection} for set operations.
-Although standard GNU Emacs Lisp does not have them, the @file{cl}
+Although standard GNU Emacs Lisp does not have them, the @file{cl}
library provides versions. @inforef{Top, Overview, cl}.
@end quotation
(delq '(4) sample-list)
@result{} (a c (4))
@end group
+@end example
If you want to delete elements that are @code{equal} to a given value,
use @code{delete} (see below).
-@end example
@defun remq object list
This function returns a copy of @var{list}, with all elements removed
l
@result{} ((2) (1))
;; @r{If you want to change @code{l} reliably,}
-;; @r{write @code{(setq l (delete elt l))}.}
+;; @r{write @code{(setq l (delete '(2) l))}.}
@end group
@group
(setq l '((2) (1) (2)))