Matrix transposition: Difference between revisions

add fermat
(→‎{{header|Quackery}}: generalised to work with matrices of anything)
(add fermat)
Line 1,578:
<lang factor>( scratchpad ) { { 1 2 3 } { 4 5 6 } } flip .
{ { 1 4 } { 2 5 } { 3 6 } }</lang>
 
=={{header|Fermat}}==
Matrix transpose is built in.
<lang fermat>
Array a[3,1]
[a]:=[(1,2,3)]
[b]=Trans([a])
[a]
[b]
<lang>
{{out}}
<pre>
[[ 1, `
2, `
3 ]]
 
[[ 1, 2, 3 ]]</pre>
 
=={{header|Forth}}==
781

edits