The internal function columns is building a list with the first element of each sublist, applying an auxiliary function f to it, and then proceeding recursively with the tails of all lists.
This is the same as transposing the list of lists so that all the first elements of the sublists are grouped together, all the second elements are grouped together, and so on, and then applying f to each resulting sublist.
This commit simplifies the definition of columns by using Data.List.transpose.
The internal function columns is building a list with the first element of each sublist, applying an auxiliary function f to it, and then proceeding recursively with the tails of all lists.
This is the same as transposing the list of lists so that all the first elements of the sublists are grouped together, all the second elements are grouped together, and so on, and then applying f to each resulting sublist.
This commit simplifies the definition of columns by using Data.List.transpose.