LIST FUNCTIONS



RETURN THE CAR OF A LIST NODE

(car <expr>)


RETURN THE CDR OF A LIST NODE

(
cdr <expr>)


ALL CxxR COMBINATIONS

(
cxxr <expr>)


ALL CxxxR COMBINATIONS

(
cxxxr <expr>)


ALL CxxxxR COMBINATIONS

(
cxxxxr <expr>)


A SYNONYM FOR CAR

(
first <expr>)


A SYNONYM FOR CADR

(
second <expr>)


A SYNONYM FOR CADDR

(
third <expr>)


A SYNONYM FOR CADDDR

(
fourth <expr>)


A SYNONYM FOR CDR

(
rest <expr>)


CONSTRUCT A NEW LIST NODE

(
cons <expr1> <expr2>)


ADD TO FRONT OF ASSOC LIST

(
acons <expr1> <expr2> <alist>)

defined in common.lsp


CREATE A LIST OF VALUES

(
list <expr>...)

(list* <expr> ... <list>)


APPEND LISTS

(
append <expr>...)


FIND THE LENGTH OF A LIST

(
list-length <list>)


RETURN THE LAST LIST NODE OF A LIST

(last <list>)


RETURN COPY OF ALL BUT LAST OF LIST

(
butlast <list> [<n>])


RETURN THE NTH ELEMENT OF A LIST

(nth <n> <list>)


RETURN THE NTH CDR OF A LIST

(nthcdr <n> <list>)


FIND AN EXPRESSION IN A LIST

(member <expr> <list> &key :test :test-not :key)


FIND AN EXPRESSION IN AN A-LIST

(assoc <expr> <alist> &key :test :test-not :key)


APPLY FUNCTION TO SUCCESSIVE CARS

(mapc <fcn> <list1> <list>...)


APPLY FUNCTION TO SUCCESSIVE CARS

(mapcar <fcn> <list1> <list>...)


APPLY FUNCTION TO SUCCESSIVE CDRS

(mapl <fcn> <list1> <list>...)


APPLY FUNCTION TO SUCCESSIVE CDRS

(maplist <fcn> <list1> <list>...)


APPL FUNCTION TO SUCCESSIVE CARS

(
mapcan <fcn> <list1> <list>...)


APPL FUNCTION TO SUCCESSIVE CDRS

(
mapcon <fcn> <list1> <list>...)


(subst <to> <from> <expr> &key :test :test-not :key)

SUBSTITUTE EXPRESSIONS

(nsubst <to> <from> <expr> &key :test :test-not :key)

SUBST does minimum copying as required by Common Lisp. NSUBST is the destructive version.


(sublis <alist> <expr> &key :test :test-not :key)

SUBSTITUTE WITH AN A-LIST

(nsublis <alist> <expr> &key :test :test-not :key)

SUBLIS does minimum copying as required by Common Lisp. NSUBLIS is the destructive version.


BUILD AN A-LIST FROM TWO LISTS

(
pairlis <keys> <values> [<alist>])

In file common.lsp

<keys> list of association keys

<values> list of association values, same length as keys

<alist> existing association list, default NIL


COPY THE TOP LEVEL OF A LIST

(
copy-list <list>)


COPY AN ASSOCIATION LIST

(
copy-alist <alist>)

In file common.lsp


COPY A TREE

(
copy-tree <tree>)


SET FUNCTIONS

(
intersection <list1> <list2> &key :test :test-not :key)

(union <list1> <list2> &key :test :test-not :key)

(set-difference <list1> <list2> &key :test :test-not :key)

(set-exclusive-or <list1> <list2> &key :test :test-not :key)

(nintersection <list1> <list2> &key :test :test-not :key)

(nunion <list1> <list2> &key :test :test-not :key)

(nset-difference <list1> <list2> &key :test :test-not :key)

(nset-exclusive-or <list1> <list2> &key :test :test-not :key)

set-exclusive-or and nset-exclusive-or defined in common.lsp. nunion, nintersection, and nset-difference are aliased to their non-destructive counterparts in common.lsp.

union: list of all elements in either list

set-diference: list of all elements in first list but not in second list

set-exclusive-or: list of all elements in only one list

"n" versions are potentially destructive.


ADD UNIQUE TO LIST

(
adjoin <expr> <list> :test :test-not :key)


XLISP-PLUS - Version 2.1g - Tom Almy tom.almy@tek.com - 18 JUL 94
Generated with
WebMaker