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.

Destructive List Functions

(rplaca <list> <expr>)  REPLACE THE CAR OF A LIST NODE
    <list>      the list node
    <expr>      the new value for the car of the list node
    returns     the list node after updating the car
(rplacd <list> <expr>)  REPLACE THE CDR OF A LIST NODE
    <list>      the list node
    <expr>      the new value for the cdr of the list node
    returns     the list node after updating the cdr
(nconc <list>...)  DESTRUCTIVELY CONCATENATE LISTS
    <list>      lists to concatenate
    returns     the result of concatenating the lists
(delete <expr> &key :test :test-not)  DELETE ELEMENTS FROM A LIST
    <expr>      the element to delete
    <list>      the list
    :test       the test function (defaults to eql)
    :test-not   the test function (sense inverted)      
    returns     the list with the matching expressions deleted
(delete-if <test> <list>)  DELETE ELEMENTS THAT PASS TEST
    <test>      the test predicate
    <list>      the list
    returns     the list with matching elements deleted
(delete-if-not <test> <list>)  DELETE ELEMENTS THAT FAIL TEST
    <test>      the test predicate
    <list>      the list
    returns     the list with non-matching elements deleted
(sort <list> <test>)  SORT A LIST
    <list>      the list to sort
    <test>      the comparison function
    returns     the sorted list

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