:: [a] -> [[a]] package:rio

The subsequences function returns the list of all subsequences of the argument.
>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]
The permutations function returns the list of all permutations of the argument.
>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]
The inits function returns all initial segments of the argument, shortest first. For example,
>>> inits "abc"
["","a","ab","abc"]
Note that inits has the following strictness property: inits (xs ++ _|_) = inits xs ++ _|_ In particular, inits _|_ = [] : _|_
The tails function returns all final segments of the argument, longest first. For example,
>>> tails "abc"
["abc","bc","c",""]
Note that tails has the following strictness property: tails _|_ = _|_ : _|_
The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,
>>> group "Mississippi"
["M","i","ss","i","ss","i","pp","i"]
It is a special case of groupBy, which allows the programmer to supply their own equality test.