yield_all_rotations_of_sequence

sequencetools.yield_all_rotations_of_sequence(sequence, n=1)

Yields all n-rotations of sequence.

>>> list(sequencetools.yield_all_rotations_of_sequence([1, 2, 3, 4], -1))
[[1, 2, 3, 4], [2, 3, 4, 1], [3, 4, 1, 2], [4, 1, 2, 3]]

Yields rotations up to but not including identity.

Returns generator.