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 ? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe