Returns a FoscCyclicArray.
Cyclic array.
Cyclic arrays overload the item-getting method of built-in arrays.
Cyclic arrays return a value for any integer index.
Cyclic arrays otherwise behave exactly like built-in arrays.
| items | Gets items in cyclic tuple. |
| includes | (abjad: container) |
| == | Is true when argument is a tuple with items equal to those of this cyclic tuple. Otherwise false. |
| at | Gets item or slice identified by argument. Returns nil when no item exists at index. |
| atAll | |
| copySeries | (abjad: _get_slice) |
| hash | Hashes cyclic tuple. |
| iter | Iterates cyclic tuple. Iterates items only once. |
| size | Gets length of cyclic tuple. |
| str | Gets string representation of cyclic tuple. |
Example
a = FoscCyclicArray(#[a, b, c, d]);
(0..12).collect { |i| a[i] };[ 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd', 'a' ]Gets items in cyclic tuple.
Returns array.
(abjad: container)
Is true when cyclic tuple contains item.
Returns true or false.
Is true when argument is a tuple with items equal to those of this cyclic tuple. Otherwise false.
Returns true or false.
Gets item or slice identified by argument. Returns nil when no item exists at index.
Returns item.
(abjad: _get_slice)
Example
a = FoscCyclicArray(#[a,b,c,d,e,f]);
a[0..12];[ 'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f', 'a' ]
a = FoscCyclicArray(#[a,b,c,d,e,f]);
a[..12];[ 'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f', 'a' ]
a = FoscCyclicArray(#[a,b,c,d,e,f]);
a[3..17];[ 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f', 'a', 'b', 'c', 'd', 'e', 'f' ]
a = FoscCyclicArray(#[a,b,c,d,e,f]);
a[0, 2 .. 15];[ 'a', 'c', 'e', 'a', 'c', 'e', 'a', 'c' ]Hashes cyclic tuple.
Returns integer.
Iterates cyclic tuple. Iterates items only once.
Does not iterate infinitely.
Gets length of cyclic tuple.
Returns nonnegative integer.
Gets string representation of cyclic tuple.
Returns string.