
18 Apr
2007
18 Apr
'07
5:54 a.m.
On Wed, 18 Apr 2007, Chris Witte wrote:
I just started playing around with GHC.PArr and array comprehension and I was wondering if there is a way to define the transpose of a matrix using array comprehension?
Why not let swap :: (i,j) -> (j,i) swap (a,b) = (b,a) in ixmap (let (lower,upper) = bounds arr in (swap lower, swap upper)) swap arr ?