RosettaCodeData/Task/Matrix-transposition/F-Sharp/matrix-transposition.fs

2 lines
102 B
Forth

let transpose (mtx : _ [,]) = Array2D.init (mtx.GetLength 1) (mtx.GetLength 0) (fun x y -> mtx.[y,x])