Cycles through permutations of first argument
nextp(perm, b = 1)
perm
indices to be permutedj
b
number to begin at. Set equal to 1.
The next permutation