Provides a low-level interface to the container/ring package.
Package ring implements operations on circular lists.
ConstantsConstants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.
Functions, Macros, and Special Forms
New creates a ring of n elements.
Go input arguments: (n int)
Go return type: *Ring
Joker input arguments: [^Int n]
Joker return type: (ref-to go.std.container.ring/Ring)
*RingConcrete GoType v1.0
LenReceiver for *Ring v1.0
Len computes the number of elements in ring r.
It executes in time proportional to the number of elements.
MoveReceiver for *Ring v1.0
Move moves n % r.Len() elements backward (n < 0) or forward (n >= 0)
in the ring and returns that ring element. r must not be empty.
NextReceiver for *Ring v1.0
Next returns the next ring element. r must not be empty.
PrevReceiver for *Ring v1.0
Prev returns the previous ring element. r must not be empty.
UnlinkReceiver for *Ring v1.0
Unlink removes n % r.Len() elements from the ring r, starting
at r.Next(). If n % r.Len() == 0, r remains unchanged.
The result is the removed subring. r must not be empty.
RingConcrete GoType v1.0
A Ring is an element of a circular list, or ring.
Rings do not have a beginning or end; a pointer to any ring element
serves as reference to the entire ring. Empty rings are represented
as nil Ring pointers. The zero value for a Ring is a one-element
ring with a nil Value.