cris cris wrote: > To be honest I'm not very familiar with haskell and stuff > so don't laugh with my question... > here it goes.. > We can represent a matrix as a list of lists... > which means that > 1 2 3 > 4 7 6 > 2 5 1 > could be written as follows: [[1,2,3],[4,7,6],[2,5,1]] > The question is how can I reverse the matrix (each row becomes a column)
The "transpose" function in the List module does exactly that. However, a list may not be the best choice here; an array would probably be better. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe