Matrix transposition: Difference between revisions

Added K Version
(added Icon/Unicon example)
(Added K Version)
Line 989:
linrec .
</lang>
 
=={{header|K}}==
Transpose is the monadic verb <code>+</code>
 
<lang k> {x^\:-1_ x}1+!:5
(1 1 1 1.0
2 4 8 16.0
3 9 27 81.0
4 16 64 256.0
5 25 125 625.0)
 
+{x^\:-1_ x}1+!:5
(1 2 3 4 5.0
1 4 9 16 25.0
1 8 27 64 125.0
1 16 81 256 625.0)</lang>
 
=={{header|Lua}}==
<lang lua>function Transpose( m )