Node: Lists, Next: , Previous: Characters, Up: Top



Lists

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

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

RASSOC-IF (predicate alist) Function
Package:LISP

Returns the first cons in ALIST whose cdr satisfies PREDICATE.

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

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

NTH (n list) Function
Package:LISP

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

CAAR (x) Function
Package:LISP

Equivalent to (CAR (CAR X)).

NULL (x) Function
Package:LISP

Returns T if X is NIL; NIL otherwise.

FIFTH (x) Function
Package:LISP

Equivalent to (CAR (CDDDDR X)).

NCONC (&rest lists) Function
Package:LISP

Concatenates LISTs by destructively modifying them.

TAILP (sublist list) Function
Package:LISP

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

CONSP (x) Function
Package:LISP

Returns T if X is a cons; NIL otherwise.

TENTH (x) Function
Package:LISP

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

LISTP (x) Function
Package:LISP

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

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

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

EIGHTH (x) Function
Package:LISP

Equivalent to (CADDDR (CDDDDR X)).

LENGTH (sequence) Function
Package:LISP

Returns the length of SEQUENCE.

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

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

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

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

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

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

CDR (list) Function
Package:LISP

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

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

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

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

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

CONS (x y) Function
Package:LISP

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

LIST (&rest args) Function
Package:LISP

Returns a list of its arguments

THIRD (x) Function
Package:LISP

Equivalent to (CADDR X).

CDDAAR (x) Function
Package:LISP

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

CDADAR (x) Function
Package:LISP

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

CDAADR (x) Function
Package:LISP

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

CADDAR (x) Function
Package:LISP

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

CADADR (x) Function
Package:LISP

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

CAADDR (x) Function
Package:LISP

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

NTHCDR (n list) Function
Package:LISP

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

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

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

SEVENTH (x) Function
Package:LISP

Equivalent to (CADDR (CDDDDR X)).

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

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

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

Substitutes NEW for subtrees of TREE that satisfy TEST.

COPY-LIST (list) Function
Package:LISP

Returns a new copy of LIST.

LAST (list) Function
Package:LISP

Returns the last cons in LIST

CAAAR (x) Function
Package:LISP

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

LIST-LENGTH (list) Function
Package:LISP

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

CDDDR (x) Function
Package:LISP

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

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

Returns the intersection of List1 and List2.

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

Substitutes NEW for subtrees in TREE that match OLD.

REVAPPEND (x y) Function
Package:LISP

Equivalent to (APPEND (REVERSE X) Y)

CDAR (x) Function
Package:LISP

Equivalent to (CDR (CAR X)).

CADR (x) Function
Package:LISP

Equivalent to (CAR (CDR X)).

REST (x) Function
Package:LISP

Equivalent to (CDR X).

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

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

ACONS (key datum alist) Function
Package:LISP

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

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

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

RPLACA (x y) Function
Package:LISP

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

SECOND (x) Function
Package:LISP

Equivalent to (CADR X).

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

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

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

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

COPY-ALIST (alist) Function
Package:LISP Returns a new copy of ALIST.

SIXTH (x) Function
Package:LISP Equivalent to (CADR (CDDDDR X)).

CAAAAR (x) Function
Package:LISP

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

CDDDAR (x) Function
Package:LISP

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

CDDADR (x) Function
Package:LISP

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

CDADDR (x) Function
Package:LISP

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

CADDDR (x) Function
Package:LISP

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

FOURTH (x) Function
Package:LISP

Equivalent to (CADDDR X).

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

Substitutes from ALIST for subtrees of TREE.

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

Substitutes NEW for subtrees of TREE that satisfy TEST.

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

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

POP Special Form
Package:LISP

Syntax:

          (pop place)
          

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

PUSH Special Form
Package:LISP

Syntax:

          (push item place)
          

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

CDAAR (x) Function
Package:LISP

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

CADAR (x) Function
Package:LISP

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

CAADR (x) Function
Package:LISP

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

FIRST (x) Function
Package:LISP

Equivalent to (CAR X).

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

Substitutes NEW for subtrees of TREE that match OLD.

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

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

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

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

PUSHNEW Macro
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.

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

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

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

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

CDDR (x) Function
Package:LISP

Equivalent to (CDR (CDR X)).

GETF (place indicator &optional (default nil)) Function
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.

LDIFF (list sublist) Function
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.

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

Returns the union of LIST1 and LIST2.

ASSOC-IF-NOT (test alist) Function
Package:LISP

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

RPLACD (x y) Function
Package:LISP

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

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

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

CAR (list) Function
Package:LISP

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

ENDP (x) Function
Package:LISP

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

LIST* (arg &rest others) Function
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.

NINTH (x) Function
Package:LISP

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

CDAAAR (x) Function
Package:LISP

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

CADAAR (x) Function
Package:LISP

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

CAADAR (x) Function
Package:LISP

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

CAAADR (x) Function
Package:LISP

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

CDDDDR (x) Function
Package:LISP

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

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

Substitutes from ALIST for subtrees of TREE nondestructively.

RASSOC-IF-NOT (predicate alist) Function
Package:LISP

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

NRECONC (x y) Function
Package:LISP

Equivalent to (NCONC (NREVERSE X) Y).

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

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

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

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

ASSOC-IF (test alist) Function
Package:LISP

Returns the first pair in ALIST whose car satisfies TEST.

GET-PROPERTIES (place indicator-list) Function
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.

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

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

COPY-TREE (object) Function
Package:LISP

Recursively copies conses in OBJECT and returns the result.

ATOM (x) Function
Package:LISP

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

CDDAR (x) Function
Package:LISP

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

CDADR (x) Function
Package:LISP

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

CADDR (x) Function
Package:LISP

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

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

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

APPEND (&rest lists) Function
Package:LISP

Constructs a new list by concatenating its arguments.

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

Returns the tail of LIST beginning with the first ITEM.