Next: Destructive Operations, Previous: Error Checking in Function Calls, Up: Evaluation and Compilation
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.
For list traversal operations, the cdr chain of the
list is not allowed to be destructively modified.
For array traversal operations, the array is not allowed
to be adjusted and its fill pointer, if any, is not allowed to
be changed.
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.
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.