nikic/iter — pull request #17 by camspiers (2014-01-30 09:35:44+00:00)
Title: Support for cycle

Takes an iterator and cycles through its elements a given number of times

If working with a generator it is best to make it rewindable if the expected
number of elements is large

Examples:

iter\cycle([1, 2, 3], 3)
=> iter(1, 2, 3, 1, 2, 3, 1, 2, 3)