## 4 Lists

Function: NINTERSECTION (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the intersection of LIST1 and LIST2. LIST1 may be destroyed.

Function: RASSOC-IF (predicate alist)

  Package:LISP

  Returns the first cons in ALIST whose cdr satisfies PREDICATE.

Function: MAKE-LIST (size &key (initial-element nil))

  Package:LISP

  Creates and returns a list containing SIZE elements, each of which is initialized to INITIAL-ELEMENT.

Function: NTH (n list)

  Package:LISP

  Returns the N-th element of LIST, where the car of LIST is the zeroth element.

Function: CAAR (x)

  Package:LISP

  Equivalent to (CAR (CAR X)).

Function: NULL (x)

  Package:LISP

  Returns T if X is NIL; NIL otherwise.

Function: FIFTH (x)

  Package:LISP

  Equivalent to (CAR (CDDDDR X)).

Function: NCONC (&rest lists)

  Package:LISP

  Concatenates LISTs by destructively modifying them.

Function: TAILP (sublist list)

  Package:LISP

  Returns T if SUBLIST is one of the conses in LIST; NIL otherwise.

Function: CONSP (x)

  Package:LISP

  Returns T if X is a cons; NIL otherwise.

Function: TENTH (x)

  Package:LISP

  Equivalent to (CADR (CDDDDR (CDDDDR X))).

Function: LISTP (x)

  Package:LISP

  Returns T if X is either a cons or NIL; NIL otherwise.

Function: MAPCAN (fun list &rest more-lists)

  Package:LISP

  Applies FUN to successive cars of LISTs, NCONCs the results, and returns it.

Function: EIGHTH (x)

  Package:LISP

  Equivalent to (CADDDR (CDDDDR X)).

Function: LENGTH (sequence)

  Package:LISP

  Returns the length of SEQUENCE.

Function: RASSOC (item alist &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the first cons in ALIST whose cdr is equal to ITEM.

Function: NSUBST-IF-NOT (new test tree &key (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees of TREE that do not satisfy TEST.

Function: NBUTLAST (list &optional (n 1))

  Package:LISP

  Changes the cdr of the N+1 th cons from the end of the list LIST to NIL. Returns the whole list.

Function: CDR (list)

  Package:LISP

  Returns the cdr of LIST. Returns NIL if LIST is NIL.

Function: MAPC (fun list &rest more-lists)

  Package:LISP

  Applies FUN to successive cars of LISTs. Returns the first LIST.

Function: MAPL (fun list &rest more-lists)

  Package:LISP

  Applies FUN to successive cdrs of LISTs. Returns the first LIST.

Function: CONS (x y)

  Package:LISP

  Returns a new cons whose car and cdr are X and Y, respectively.

Function: LIST (&rest args)

  Package:LISP

  Returns a list of its arguments

Function: THIRD (x)

  Package:LISP

  Equivalent to (CADDR X).

Function: CDDAAR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CAR (CAR X)))).

Function: CDADAR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CDR (CAR X)))).

Function: CDAADR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CAR (CDR X)))).

Function: CADDAR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CDR (CAR X)))).

Function: CADADR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CAR (CDR X)))).

Function: CAADDR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CDR (CDR X)))).

Function: NTHCDR (n list)

  Package:LISP

  Returns the result of performing the CDR operation N times on LIST.

Function: PAIRLIS (keys data &optional (alist nil))

  Package:LISP

  Constructs an association list from KEYS and DATA adding to ALIST.

Function: SEVENTH (x)

  Package:LISP

  Equivalent to (CADDR (CDDDDR X)).

Function: SUBSETP (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns T if every element of LIST1 appears in LIST2; NIL otherwise.

Function: NSUBST-IF (new test tree &key (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees of TREE that satisfy TEST.

Function: COPY-LIST (list)

  Package:LISP

  Returns a new copy of LIST.

Function: LAST (list)

  Package:LISP

  Returns the last cons in LIST

Function: CAAAR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CAR X))).

Function: LIST-LENGTH (list)

  Package:LISP

  Returns the length of LIST, or NIL if LIST is circular.

Function: CDDDR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CDR X))).

Function: INTERSECTION (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the intersection of List1 and List2.

Function: NSUBST (new old tree &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees in TREE that match OLD.

Function: REVAPPEND (x y)

  Package:LISP

  Equivalent to (APPEND (REVERSE X) Y)

Function: CDAR (x)

  Package:LISP

  Equivalent to (CDR (CAR X)).

Function: CADR (x)

  Package:LISP

  Equivalent to (CAR (CDR X)).

Function: REST (x)

  Package:LISP

  Equivalent to (CDR X).

Function: NSET-EXCLUSIVE-OR (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns a list with elements which appear but once in LIST1 and LIST2.

Function: ACONS (key datum alist)

  Package:LISP

  Constructs a new alist by adding the pair (KEY . DATUM) to ALIST.

Function: SUBST-IF-NOT (new test tree &key (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees of TREE that do not satisfy TEST.

Function: RPLACA (x y)

  Package:LISP

  Replaces the car of X with Y, and returns the modified X.

Function: SECOND (x)

  Package:LISP

  Equivalent to (CADR X).

Function: NUNION (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the union of LIST1 and LIST2. LIST1 and/or LIST2 may be destroyed.

Function: BUTLAST (list &optional (n 1))

  Package:LISP

  Creates and returns a list with the same elements as LIST but without the last N elements.

Function: COPY-ALIST (alist)

  Package:LISP Returns a new copy of ALIST.

Function: SIXTH (x)

  Package:LISP Equivalent to (CADR (CDDDDR X)).

Function: CAAAAR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CAR (CAR X)))).

Function: CDDDAR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CDR (CAR X)))).

Function: CDDADR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CAR (CDR X)))).

Function: CDADDR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CDR (CDR X)))).

Function: CADDDR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CDR (CDR X)))).

Function: FOURTH (x)

  Package:LISP

  Equivalent to (CADDDR X).

Function: NSUBLIS (alist tree &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Substitutes from ALIST for subtrees of TREE.

Function: SUBST-IF (new test tree &key (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees of TREE that satisfy TEST.

Function: NSET-DIFFERENCE (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns a list of elements of LIST1 that do not appear in LIST2. LIST1 may be destroyed.

Special Form: POP

  Package:LISP

  Syntax:

      (pop place)

  Pops one item off the front of the list in PLACE and returns it.

Special Form: PUSH

  Package:LISP

  Syntax:

      (push item place)

  Conses ITEM onto the list in PLACE, and returns the new list.

Function: CDAAR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CAR X))).

Function: CADAR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CAR X))).

Function: CAADR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CDR X))).

Function: FIRST (x)

  Package:LISP

  Equivalent to (CAR X).

Function: SUBST (new old tree &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Substitutes NEW for subtrees of TREE that match OLD.

Function: ADJOIN (item list &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Adds ITEM to LIST unless ITEM is already a member of LIST.

Function: MAPCON (fun list &rest more-lists)

  Package:LISP

  Applies FUN to successive cdrs of LISTs, NCONCs the results, and returns it.

Macro: PUSHNEW

  Package:LISP

  Syntax:

      (pushnew item place {keyword value}*)

  If ITEM is already in the list stored in PLACE, does nothing. Else, conses ITEM onto the list. Returns NIL. If no KEYWORDs are supplied, each element in the list is compared with ITEM by EQL, but the comparison can be controlled by supplying keywords :TEST, :TEST-NOT, and/or :KEY.

Function: SET-EXCLUSIVE-OR (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns a list of elements appearing exactly once in LIST1 and LIST2.

Function: TREE-EQUAL (x y &key (test #'eql) test-not)

  Package:LISP

  Returns T if X and Y are isomorphic trees with identical leaves.

Function: CDDR (x)

  Package:LISP

  Equivalent to (CDR (CDR X)).

Function: GETF (place indicator &optional (default nil))

  Package:LISP

  Searches the property list stored in Place for an indicator EQ to Indicator. If one is found, the corresponding value is returned, else the Default is returned.

Function: LDIFF (list sublist)

  Package:LISP

  Returns a new list, whose elements are those of LIST that appear before SUBLIST. If SUBLIST is not a tail of LIST, a copy of LIST is returned.

Function: UNION (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the union of LIST1 and LIST2.

Function: ASSOC-IF-NOT (test alist)

  Package:LISP

  Returns the first pair in ALIST whose car does not satisfy TEST.

Function: RPLACD (x y)

  Package:LISP

  Replaces the cdr of X with Y, and returns the modified X.

Function: MEMBER-IF-NOT (test list &key (key #'identity))

  Package:LISP

  Returns the tail of LIST beginning with the first element not satisfying TEST.

Function: CAR (list)

  Package:LISP

  Returns the car of LIST. Returns NIL if LIST is NIL.

Function: ENDP (x)

  Package:LISP

  Returns T if X is NIL. Returns NIL if X is a cons. Otherwise, signals an error.

Function: LIST* (arg &rest others)

  Package:LISP

  Returns a list of its arguments with the last cons being a dotted pair of the next to the last argument and the last argument.

Function: NINTH (x)

  Package:LISP

  Equivalent to (CAR (CDDDDR (CDDDDR X))).

Function: CDAAAR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CAR (CAR X)))).

Function: CADAAR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CAR (CAR X)))).

Function: CAADAR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CDR (CAR X)))).

Function: CAAADR (x)

  Package:LISP

  Equivalent to (CAR (CAR (CAR (CDR X)))).

Function: CDDDDR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CDR (CDR X)))).

Function: SUBLIS (alist tree &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Substitutes from ALIST for subtrees of TREE nondestructively.

Function: RASSOC-IF-NOT (predicate alist)

  Package:LISP

  Returns the first cons in ALIST whose cdr does not satisfy PREDICATE.

Function: NRECONC (x y)

  Package:LISP

  Equivalent to (NCONC (NREVERSE X) Y).

Function: MAPLIST (fun list &rest more-lists)

  Package:LISP

  Applies FUN to successive cdrs of LISTs and returns the results as a list.

Function: SET-DIFFERENCE (list1 list2 &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns a list of elements of LIST1 that do not appear in LIST2.

Function: ASSOC-IF (test alist)

  Package:LISP

  Returns the first pair in ALIST whose car satisfies TEST.

Function: GET-PROPERTIES (place indicator-list)

  Package:LISP

  Looks for the elements of INDICATOR-LIST in the property list stored in PLACE. If found, returns the indicator, the value, and T as multiple-values. If not, returns NILs as its three values.

Function: MEMBER-IF (test list &key (key #'identity))

  Package:LISP

  Returns the tail of LIST beginning with the first element satisfying TEST.

Function: COPY-TREE (object)

  Package:LISP

  Recursively copies conses in OBJECT and returns the result.

Function: ATOM (x)

  Package:LISP

  Returns T if X is not a cons; NIL otherwise.

Function: CDDAR (x)

  Package:LISP

  Equivalent to (CDR (CDR (CAR X))).

Function: CDADR (x)

  Package:LISP

  Equivalent to (CDR (CAR (CDR X))).

Function: CADDR (x)

  Package:LISP

  Equivalent to (CAR (CDR (CDR X))).

Function: ASSOC (item alist &key (test #'eql) test-not)

  Package:LISP

  Returns the first pair in ALIST whose car is equal (in the sense of TEST) to ITEM.

Function: APPEND (&rest lists)

  Package:LISP

  Constructs a new list by concatenating its arguments.

Function: MEMBER (item list &key (test #'eql) test-not (key #'identity))

  Package:LISP

  Returns the tail of LIST beginning with the first ITEM.