Aref1
Access the elements of a 1-dimensional array
Example Form:
(aref1 'delta1 a (+ i k))
General Form:
(aref1 name alist index)
where name is a symbol, alist is a 1-dimensional array and
index is a legal index into alist. This function returns the value
associated with index in alist, or else the default value of the
array. See arrays for details.
This function executes in virtually constant time if alist is in fact
the ``semantic value'' associated with name (see arrays). When it
is not, aref1 must do a linear search through alist. In that case
the correct answer is returned but a slow array comment is printed to
the comment window. See slow-array-warning.
Function: aref1
(defun aref1 (name l n)
(declare (xargs :guard (and (array1p name l)
(integerp n)
(>= n 0)
(< n (car (dimensions name l))))))
(let ((x (and (not (eq n :header)) (assoc n l))))
(cond ((null x) (default name l))
(t (cdr x)))))