cycle package:numeric-prelude

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.
We shall make a little bit of a hack here, enabling us to use additive or multiplicative syntax for groups as we wish by simply instantiating Num with both operations corresponding to the group operation of the permutation group we're studying There are quite a few way we could represent elements of permutation groups: the images in a row, a list of the cycles, et.c. All of these differ highly in how complex various operations end up being.
Permutation of Integers represented by cycles.
Does not check whether the input values are in range.