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"]
package action-permutations
Sequence a set of Alternative actions in each possible order, based on "Parsing Permutation Phrases", by Arthur Baars, Andres Loeh and S. Doaitse Swierstra, Haskell Workshop 2001. This is particularly useful for constructing a parser for permutations of elements. This version has a slightly different interface from the paper. Version