Substitution of Expressions
Lists
Association Lists
These functions perform operations on lists which represent sets of elements.
equal to item. The member function is
built-in to Emacs 19; this package defines it equivalently in Emacs 18.
See the following function for a Common-Lisp compatible version.
&key :test :test-not :key
car was
the matching element. Otherwise, it returns nil. Elements
are compared by eql by default; you can use the :test,
:test-not, and :key arguments to modify this behavior.
See Sequences.
Note that this function's name is suffixed by `*' to avoid
the incompatible member function defined in Emacs 19.
(That function uses equal for comparisons; it is equivalent
to (member* item list :test 'equal).)
The member-if and member-if-not functions
analogously search for elements which satisfy a given predicate.
t if sublist is a sublist of
list, i.e., if sublist is eql to list or to
any of its cdrs.
&key :test :test-not :key
(cons item list), but only if item
is not already present on the list (as determined by member*).
If a :key argument is specified, it is applied to
item as well as to the elements of list during
the search, on the reasoning that item is ``about'' to
become part of the list.
&key :test :test-not :key
&key :test :test-not :key
union; rather than copying,
it tries to reuse the storage of the argument lists if possible.
&key :test :test-not :key
&key :test :test-not :key
intersection. It
tries to reuse storage of list1 rather than copying.
It does not reuse the storage of list2.
&key :test :test-not :key
&key :test :test-not :key
set-difference, which will try
to reuse list1 if possible.
&key :test :test-not :key
&key :test :test-not :key
set-exclusive-or, which will try
to reuse list1 and list2 if possible.
&key :test :test-not :key