cycle()
cycle(array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable $source) : \YaLinqo\Enumerable
Cycles through the source sequence.
Syntax: cycle (source)
Source keys are discarded.
Parameters
array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable | $source | Source sequence. |
Throws
- \InvalidArgumentException
If source is not array or Traversible or Enumerable.
- \UnexpectedValueException
If source contains no elements (checked during enumeration).
Returns
\YaLinqo\Enumerable —Endless list of items repeating the source sequence.