All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

ring-push

Function
Summary

Adds a Lisp object to a ring.

Package

hcl

Signature

ring-push object ring => object

Arguments

object

A Lisp object.

ring

A ring object created by make-ring.

Values

object

A Lisp object.

Description

The function ring-push adds any Lisp object as an element of the ring before the "insertion position", which means that a following ring-pop will return it. If the ring is full, that is the number of elements in the 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 the ring, if ring-push removed an element and there is a delete-function (see make-ring), then ring-push calls delete-function on the element that it removes.

ring-push returns object.

See also

ring-pop
make-ring
rotate-ring
ring-ref


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex