[[a]] -> [[a]]
The transpose function transposes the rows and columns of its argument. For example,
> transpose [[1,2,3],[4,5,6]] == [[1,4],[2,5],[3,6]]
Concatenate a list of lists.
The inits function returns all initial segments of the argument, shortest first. For example,
> inits "abc" == ["","a","ab","abc"]
The permutations function returns the list of all permutations of the argument.
> permutations "abc" == ["abc","bac","cba","bca","cab","acb"]
The subsequences function returns the list of all subsequences of the argument.
> subsequences "abc" == ["","a","b","ab","c","ac","bc","abc"]
The tails function returns all final segments of the argument, longest first. For example,
> tails "abc" == ["abc", "bc", "c",""]
Evaluate each action in the sequence from left to right, and collect the results.
intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.
The groupWith function uses the user supplied function which projects an element out of every list element in order to to first sort the input list and then to form groups by equality on these projected elements
The groupBy function is the non-overloaded version of group.
The concatenation of all the elements of a container of lists.
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.
This generalizes the list-based concat function.
cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.
Return all the elements of a list except the last one. The list must be non-empty.
reverse xs returns the elements of xs in reverse order. xs must be finite.
Show more results