Gets or sets the element at a specified offset from the insertion point in a ring.
hcl
ring-ref ring index => object
setf (ring-ref ring index) object => object
ring⇩ |
A ring object created by make-ring. |
index⇩ |
A non-negative integer. |
object⇩ |
A Lisp object. |
object⇩ |
A Lisp object. |
The accessor ring-ref
returns or sets the element at index places before the insertion point in ring.
index must be a non-negative integer smaller than the number of elements in the ring, otherwise an error is signaled. index 0 returns or sets the element object just before the insertion point, and a larger index goes "back" (in the same direction as ring-pop and rotate-ring).
The setf function replaces the element in the ring with the new element object without affecting the ring otherwise (in particular it does not call delete-function).
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35