permutations package:base-compat-batteries

The permutations function returns the list of all permutations of the argument. Since: 4.20.0.0
permutations1 operates like permutations, but uses the knowledge that its input is non-empty to produce output where every element is non-empty.
permutations1 = fmap fromList . permutations . toList
Since: 4.20.0.0