snoyberg / classy-prelude

A typeclass-based Prelude.
108 stars 15 forks source link

Equivalent to transpose in classy-prelude? #115

Open kozross opened 8 years ago

kozross commented 8 years ago

I wanna 'invert' a table of values, as described best by the code snippet below:

 - I have

t :: [[Text]]
t = [["1", "2"], ["a", "b"], ["A", "B"]]

-- I want

t' :: [[Text]]
t' = [["1", "a", "A"], ["2", "b", "B"]]

I was suggested to use transpose, but it doesn't appear to exist in classy-prelude. Is there an equivalent to this operation?