Transpose: Difference between revisions

From The K Language Wiki
Content added Content deleted
No edit summary
mNo edit summary
Line 1: Line 1:
{{primitive}}
{{primitive}}
'''Transpose''' (a.k.a. '''flip''') swaps the leading two axes of a 2+ dimensional rectangular array. Dialects differ in their treatment atoms, lists, and ragged arrays.
'''Transpose''' (a.k.a. '''flip''') swaps the leading two axes of a 2+ dimensional rectangular array. Dialects differ in their treatment of atoms, lists, and ragged arrays.


+("ab";"cd";"ef")
+("ab";"cd";"ef")

Revision as of 16:24, 6 July 2021

Transpose
{{{1}}}

Transpose (a.k.a. flip) swaps the leading two axes of a 2+ dimensional rectangular array. Dialects differ in their treatment of atoms, lists, and ragged arrays.

 +("ab";"cd";"ef")
("ace"
 "bdf")

 +(`a`b`c;`d)
(`a`d
 `b`d
 `c`d)