Jake Mcarthur wrote:
Heh, after a couple more seconds of thought, reversing the two
composed functions fixes it:
nub . permutations
Of course, neither my previous nonsolution nor this solution are
efficient for long lists, but I think it serves as a decent reference
implementation at least.
Consider the following list:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]
Somebody just pointed out to me that this list has 87,178,291,200
permutations, of which 14 are unique. O_O
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe