
A circular shift of all elements within the given range.
1. With Step size = 2 and Index range = [1,5], the permutation (1,2,3,4,5) is turned into (4,5,1,2,3).
2. With Step size = 2 and Index range = [2,5], the permutation ((1),(2,3,4,5)) is turned into ((1),(4,5,2,3))
3. With Step size = 1 and Index range = [0,0], the permutation (1,2,3,4,5) is turned into (2,3,4,5,1).
© djmw, January 5, 2011