Traversal Rules and Side Effects
The consequences are undefined
when code executed during an object-traversing operation
destructively modifies the object in a way that might affect the
ongoing traversal operation.
In particular, the following rules apply.
- List traversal
For list traversal operations, the cdr chain of the
list is not allowed to be destructively modified.
- Array traversal
For array traversal operations, the array is not allowed
to be adjusted and its fill pointer, if any, is not allowed to
be changed.
- Hash-table traversal
For hash table traversal operations, new elements may not be added
or deleted except that the element corresponding to the current hash key
may be changed or removed.
- Package traversal
For package traversal operations (e.g., do-symbols),
new symbols may not be interned in or uninterned
from the package being traversed
or any package that it uses except that the
current symbol may be uninterned from the package
being traversed.
Backlinks
adjoin,
assoc, assoc-if, assoc-if-not,
count, count-if, count-if-not,
do-symbols, do-external-symbols, do-all-symbols,
dolist,
Evaluation and Compilation,
every, some, notevery, notany,
find, find-if, find-if-not,
intersection, nintersection,
map,
mapc, mapcar, mapcan, mapl, maplist, mapcon,
maphash,
member, member-if, member-if-not,
merge,
mismatch,
position, position-if, position-if-not,
rassoc, rassoc-if, rassoc-if-not,
reduce,
remove, remove-if, remove-if-not, delete, delete-if, delete-if-not,
remove-duplicates, delete-duplicates,
Restrictions on Side-Effects,
search,
set-difference, nset-difference,
set-exclusive-or, nset-exclusive-or,
sort, stable-sort,
sublis, nsublis,
subsetp,
subst, subst-if, subst-if-not, nsubst, nsubst-if, nsubst-if-not,
substitute, substitute-if, substitute-if-not, nsubstitute, nsubstitute-if, nsubstitute-if-not,
tree-equal,
union, nunion,
with-hash-table-iterator,
with-input-from-string,
with-output-to-string,
with-package-iterator