XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next
17 Destructive List Functions
- rplaca - replace the car of a list node
- rplacd - replace the cdr of a list node
- nconc - destructively concatenate lists
- delete - delete elements from a list
- delete-if - delete elements that pass test
- delete-if-not - delete elements that fail test
- sort - sort a list
- (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
XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next