npstreams.cyclic

npstreams.cyclic(iterable)

Yields cyclic permutations of an iterable.

Examples

>>> from npstreams import cyclic
>>> list(cyclic((1,2,3)))
[(1, 2, 3), (3, 1, 2), (2, 3, 1)]