The function ring-pop
removes (by default) an element from the ring and returns the element before the insertion point.
If remove is true then the element is removed from the ring. If remove is nil
then the element remains and instead the ring is rotated by 1 as if by (rotate-ring ring 1)
. The default value of remove is t
.
These 3 forms all return the same values, but the first form removes an element from the ring, while the other two leave all the elements in the ring:
(values (ring-pop ring) (ring-ref ring 0))
(values (ring-pop ring t) (ring-ref ring 0))
(values (ring-ref ring 0) (rotate-ring ring 1))
LispWorks User Guide and Reference Manual - 20 Sep 2017