RosettaCodeData/Task/Matrix-transposition/F-Sharp/matrix-transposition.fs
2023-07-01 13:44:08 -04:00

1 line
102 B
FSharp

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