(bind-func mtrans
(lambda (m1:float* nrows:i64 ncols:i64 result:float*)
(let ((i 0) (j 0))
(dotimes (i nrows)
(dotimes (j ncols)
(pset! result (+ (* j ncols) i)
(pref m1 (+ (* i ncols) j)))))
result)))