Major Section: ARRAYS
Example Form: (aset2 'delta1 a i j 27)whereGeneral Form: (aset2 name alist i j val)
name is a symbol, alist is a 2-dimensional array named name,
i and j are legal indices into alist, and val is an arbitrary
object. See arrays for details. Roughly speaking this
function ``modifies'' alist so that the value associated with
(i . j) is val. More precisely, it returns a new array,
alist', of the same name and dimension as alist that, under
aref2, is everywhere equal to alist except at (i . j) where
the result is val. That is, (aref2 name alist' x y) is
(aref2 name alist x y) for all legal indices x y except
i and j where (aref2 name alist' i j) is val.
In order to ``modify'' alist, aset2 conses a new pair onto the
front. If the length of the resulting alist exceeds the
:maximum-length entry in the array header, aset2 compresses the
array as with compress2.
It is generally expected that the ``semantic value'' of name will be
alist (see arrays). This function operates in virtually
constant time whether this condition is true or not (unless the
compress2 operation is required). But the value returned by this
function cannot be used efficiently by subsequent aset2 operations
unless alist is the semantic value of name when aset2 is executed.
Thus, if the condition is not true, aset2 prints a slow array
warning to the comment window. See slow-array-warning.