Adds a Lisp object to a ring.
hcl
ring-push object ring => object
object⇩ |
A Lisp object. |
ring⇩ |
A ring object created by make-ring. |
object |
A Lisp object. |
The function ring-push
adds object as an element of ring before the "insertion position", which means that a following call to ring-pop will return it. If ring is full, that is the number of elements in ring is the same as its size (see make-ring), then ring-push
first removes the element after the insertion point.
Once it finished modifying ring, if ring-push
removed an element and there is a delete-function (see make-ring), then ring-push
calls delete-function with the element that it removed.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35