prolog::permutation/2

permutation(+ List,? Perm)*

True when List and Perm are permutations of each other.

% permutation(List, Perm) % is true when List and Perm are permutations of each other. Of course, % if you just want to test that, the best way is to keysort//22 the two % lists and see if the results are the same. Or you could use list_to_bag % (from BagUtl.Pl) to see if they convert to the same bag. The point of % perm is to generate permutations. The arguments may be either way round, % the only effect will be the order in which the permutations are tried. % Be careful: this is quite efficient, but the number of permutations of an % N-element list is N!, even for a 7-element list that is 5040.

Private-func:

1. prolog::permutation_2::permutation/2(int ARG1, int ARG2)():