|
string is not modified. However, if no characters in string require conversion, the result may be either string or a copy of it, at the implementation's discretion.
|
|
The string is modified directly.
|
string |
If the argument is already a string, it's simply returned.
If the argument is a symbol, its name is returned, which must not be modified. |
|
If no characters need to be trimmed from the string, then either string itself or a copy of it may be returned, at the discretion of the implementation.
|
|
If opt-arg is of type (array bit) the contents of the result are destructively placed into opt-arg. If opt-arg is the symbol t, bit-array or bit-array1 is replaced with the result; if opt-arg is nil or omitted, a new array is created to contain the result.
|
adjust-array |
The result is an array of the same type and rank as array, that is either the modified array, or a newly created array to which array can be displaced [...]
If adjust-array is applied to an array that is actually adjustable, the array returned is identical [(eq)] to array. If the array returned by adjust-array is distinct from array, then the argument array is unchanged.
|
copy-readtable |
If to-readtable is nil, a new readtable is created and returned. Otherwise the readtable specified by to-readtable is modified and returned.
|
append |
lists are left unchanged; the list structure of each of lists except the last is copied. The last argument is not copied; it becomes the cdr of the final dotted pair of the concatenation of the preceding lists, or is returned directly if there are no preceding non-empty lists.
|
revappend |
constructs a copy[2] of list, but with the elements in reverse order. It then appends (as if by nconc) the tail to that reversed list and returns the result.
|
nreconc |
reverses the order of elements in list (as if by nreverse). It then appends (as if by nconc) the tail to that reversed list and returns the result.
|
nconc |
All arguments except the last must be lists. The cdr of the last cons of each of these will be destructively modified.
The last argument can be any object and the result shares structure with it.
nconc is one of very few destructive functions adopting the "leading N" convention that actually guarantees to modify the arguments themselves.
|
butlast |
Always returns a fresh list. |
nbutlast |
may modify list. It changes the cdr of the cons n+1 from the end of the list to nil.
|
list* |
the last argument to list* becomes the cdr of the last cons constructed.
|
|
These always return their first list argument. |
|
These always return a fresh list. |
|
All results returned by the function argument will be destructively combined into a list as if by nconc. They must thus be fresh lists. Use copy-seq as necessary.
|
pairlis |
The result shares structure with alist (if supplied).
|
sublis |
If no changes are made, the original tree is returned. The original tree is left unchanged, but the result tree may share cells with it.
|
nsublis |
nsublis is permitted to modify tree [...]
|
|
If no changes are made, the original tree may be returned. The original tree is left unchanged, but the result tree may share storage with it.
|
|
the original tree is modified and returned as the function result, but the result may not be eq to tree.
|
union |
The result list may be eq to either list-1 or list-2 if appropriate.
|
nunion |
nunion is permitted to modify any part, car or cdr, of the list structure of list-1 or list-2.
Since the nunion side effect is not required, it should not be used in for-effect-only positions in portable code.
|
intersection |
The result list may share cells with, or be eq to, either list-1 or list-2 if appropriate.
|
nintersection |
nintersection is the destructive version of intersection. It performs the same operation, but may destroy list-1 using its cells to construct the result. list-2 is not destroyed.
Since the nintersection side effect is not required, it should not be used in for-effect-only positions in portable code.
|
set-difference |
The result list may share cells with, or be eq to, either of list-1 or list-2, if appropriate.
|
nset-difference |
nset-difference is the destructive version of set-difference. It may destroy list-1.
|
set-exclusive-or |
The result list of set-exclusive-or might share storage with one of list-1 or list-2.
|
nset-exclusive-or |
nset-exclusive-or is the destructive version of set-exclusive-or.
nset-exclusive-or is permitted to modify any part, car or cdr, of the list structure of list-1 or list-2.
Since the nset-exclusive-or side effect is not required, it should not be used in for-effect-only positions in portable code.
|
concatenate |
All of the sequences are copied from; the result does not share any structure with any of the sequences. Therefore, if only one sequence is provided and it is of type result-type, concatenate is required to copy sequence rather than simply returning it.
|
copy-seq |
Always returns a fresh sequence, as implied by the name... |
merge |
sequence-1 and/or sequence-2 may be destroyed.
|
remove-duplicates |
remove-duplicates returns a sequence that may share with sequence or may be identical [(eq)] to sequence if no elements need to be removed.
|
delete-duplicates |
delete-duplicates is like remove-duplicates, but delete-duplicates may modify sequence.
delete-duplicates, when sequence is a list, is permitted to setf any part, car or cdr, of the top-level list structure in that sequence. When sequence is a vector, delete-duplicates is permitted to change the dimensions of the vector and to slide its elements into new positions without permuting them to produce the resulting vector.
|
replace |
sequence-1 is destructively modified by copying successive elements into it from sequence-2.
If sequence-1 and sequence-2 are the same object and the region being modified overlaps the region being copied from, then it is as if the entire source region were copied to another place and only then copied back into the target region. However, if sequence-1 and sequence-2 are not the same, but the region being modified overlaps the region being copied from (perhaps because of shared list structure or displaced arrays), then after the replace operation the subsequence of sequence-1 being modified will have unpredictable contents.
|
reverse |
[...] reverse always creates and returns a new sequence [...] reverse never modifies the given sequence.
|
nreverse |
nreverse might modify and return the given sequence.
For nreverse, sequence might be destroyed and re-used to produce the result. The result might or might not be identical to sequence. Specifically, when sequence is a list, nreverse is permitted to setf any part, car or cdr, of any cons that is part of the list structure of sequence. When sequence is a vector, nreverse is permitted to re-order the elements of sequence in order to produce the resulting vector.
nreverse might either create a new sequence, modify the argument sequence, or both.
|
subseq |
subseq always allocates a new sequence for a result; it never shares storage with an old sequence.
|
|
sort and stable-sort destructively sort sequences [...]
The sorting operation can be destructive in all cases. In the case of a vector argument, this is accomplished by permuting the elements in place. In the case of a list, the list is destructively reordered in the same manner as for nreverse.
If sequence is a vector, the result might or might not be simple, and might or might not be identical to sequence.
|
compute-restarts |
Implementations are permitted, but not required, to return distinct lists from repeated calls to compute-restarts while in the same dynamic environment. The consequences are undefined if the list returned by compute-restarts is every (sic) modified.
|
(defgeneric compute-applicable-methods) |
This is not specified in the standard, but due to caching the result might not be a fresh list so it must not be destructively modified.
|