Permutation Sort In Prolog, Duplicates are removed.