the length of required permutation, or
the permutation for which the next we will
Value
The next permutation in lexicographic oder.
Details
When it is a natural number, then the program take it as the
length of the required permutation, and returns the first permutation
of the given length. If it is a sequence of natural numbers then
it read it as a permutation, and returns the lexicographic next
permutation of the same sequence.