Matrix transposition: Difference between revisions

→‎{{header|Haskell}}: Removed an entry (pending reassurances) which appears to violate copyright.
(→‎{{header|Haskell}}: Removed an entry (pending reassurances) which appears to violate copyright.)
Line 1,898:
transpArray a = ixmap (swap l, swap u) swap a where
(l,u) = bounds a</lang>
 
 
From Davie ''Introduction to Functional Programming Systems Using Haskell'':
<lang haskell>transpose ([]:rest) = []
transpose x = Prelude.map hd x : transpose (Prelude.map tl x)
where hd (p:_) = p
tl (_:q) = q</lang>
 
 
===With Numeric.LinearAlgebra===
9,655

edits