
1 Dec
2012
1 Dec
'12
4:33 p.m.
The description of "transpose" in Haskell 2010, section 20.2, does not tell how unequal-length rows are treated. A more revealing example would help, perhaps something like transpose [[1,2],[3],[4,5,6]] == [[1,3,4],[2,5],[6]] Notice that the usual identities, (transpose x)!!i!!j==x!!j!!i and transpose.transpose==id do not hold unless row lengths are monotone non-increasing. [It might be well to restrict the input so the identities do hold. This would simplify explanation, implementation, and proofs. Has anybody found transpose useful outside this domain?] Doug McIlroy