Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

List Functions

(car <expr>)  RETURN THE CAR OF A LIST NODE
    <expr>      the list node
    returns     the car of the list node
(cdr <expr>)  RETURN THE CDR OF A LIST NODE
    <expr>      the list node
    returns     the cdr of the list node
(cxxr <expr>)  ALL CxxR COMBINATIONS
(cxxxr <expr>)  ALL CxxxR COMBINATIONS
(cxxxxr <expr>)  ALL CxxxxR COMBINATIONS
(first <expr>)   A SYNONYM FOR CAR
(second <expr>)  A SYNONYM FOR CADR
(third <expr>)   A SYNONYM FOR CADDR
(fourth <expr>)  A SYNONYM FOR CADDDR
(rest <expr>)    A SYNONYM FOR CDR
(cons <expr1> <expr2>)  CONSTRUCT A NEW LIST NODE
    <expr1>     the car of the new list node
    <expr2>     the cdr of the new list node
    returns     the new list node
(list <expr>...)  CREATE A LIST OF VALUES
    <expr>      expressions to be combined into a list
    returns     the new list
(append <expr>...)  APPEND LISTS
    <expr>      lists whose elements are to be appended
    returns     the new list
(reverse <expr>)  REVERSE A LIST
    <expr>      the list to reverse
    returns     a new list in the reverse order
(last <list>)  RETURN THE LAST LIST NODE OF A LIST
    <list>      the list
    returns     the last list node in the list
(member <expr>  &key :test :test-not)  FIND AN EXPRESSION IN A LIST
    <expr>      the expression to find
    <list>      the list to search
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     the remainder of the list starting with the expression
(assoc <expr>  &key :test :test-not)  FIND AN EXPRESSION IN AN A-LIST
    <expr>      the expression to find
    <alist>     the association list
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     the alist entry or nil
(remove <expr>  &key :test :test-not)  REMOVE ELEMENTS FROM A LIST
    <expr>      the element to remove
    <list>      the list
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     copy of list with matching expressions removed
(remove-if <test> <list>)  REMOVE ELEMENTS THAT PASS TEST
    <test>      the test predicate
    <list>      the list
    returns     copy of list with matching elements removed
(remove-if-not <test> <list>)  REMOVE ELEMENTS THAT FAIL TEST
    <test>      the test predicate
    <list>      the list
    returns     copy of list with non-matching elements removed
(length <expr>)  FIND THE LENGTH OF A LIST, VECTOR OR STRING
    <expr>      the list, vector or string
    returns     the length of the list, vector or string
(nth <n> <list>)  RETURN THE NTH ELEMENT OF A LIST
    <n>         the number of the element to return (zero origin)
    <list>      the list
    returns     the nth element or nil if the list isn't that long
(nthcdr <n> <list>)  RETURN THE NTH CDR OF A LIST
    <n>         the number of the element to return (zero origin)
    <list>      the list
    returns     the nth cdr or nil if the list isn't that long
(mapc <fcn> <list1> <list>...)  APPLY FUNCTION TO SUCCESSIVE CARS
    <fcn>       the function or function name
    <listn>     a list for each argument of the function
    returns     the first list of arguments
(mapcar <fcn> <list1> <list>...)  APPLY FUNCTION TO SUCCESSIVE CARS
    <fcn>       the function or function name
    <listn>     a list for each argument of the function
    returns     a list of the values returned
(mapl <fcn> <list1> <list>...)  APPLY FUNCTION TO SUCCESSIVE CDRS
    <fcn>       the function or function name
    <listn>     a list for each argument of the function
    returns     the first list of arguments
(maplist <fcn> <list1> <list>...)  APPLY FUNCTION TO SUCCESSIVE CDRS
    <fcn>       the function or function name
    <listn>     a list for each argument of the function
    returns     a list of the values returned
(subst <to>   &key :test :test-not)  SUBSTITUTE EXPRESSIONS
    <to>        the new expression
    <from>      the old expression
    <expr>      the expression in which to do the substitutions
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     the expression with substitutions
(sublis <alist>  &key :test :test-not)  SUBSTITUTE WITH AN A-LIST
    <alist>     the association list
    <expr>      the expression in which to do the substitutions
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     the expression with substitutions

Go to the first, previous, next, last section, table of contents.