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

2 lines
102 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let transpose (mtx : _ [,]) = Array2D.init (mtx.GetLength 1) (mtx.GetLength 0) (fun x y -> mtx.[y,x])