permutations +base

permutations :: [a] -> [[a]]
base Data.List
The permutations function returns the list of all permutations of the argument. > permutations "abc" == ["abc","bac","cba","bca","cab","acb"]