| 1 | <?php |
||
| 11 | trait CycleTrait |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Make an iterator returning elements from this iterable and saving a |
||
| 15 | * copy of each. When the iterable is exhausted, return elements from |
||
| 16 | * the saved copy. Repeats indefinitely. |
||
| 17 | * |
||
| 18 | * > iter\iterable('ABCD')->cycle() |
||
| 19 | * A B C D A B C D A B C D ... |
||
| 20 | * |
||
| 21 | * @return iter\lib\CycleIterator |
||
| 22 | */ |
||
| 23 | 1 | public function cycle() |
|
| 27 | } |
||
| 28 |