This website requires JavaScript.
Explore
Help
Sign In
mirror
/
RosettaCodeData
mirror of
https://github.com/acmeism/RosettaCodeData.git
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
master
RosettaCodeData
/
Task
/
Matrix-transposition
/
Ruby
/
matrix-transposition-3.rb
5 lines
74 B
Ruby
Raw
Permalink
Blame
History
def
transpose
(
m
)
m
[
0
]
.
zip
(
*
m
[
1
..
-
1
]
)
end
p
transpose
(
[
[
1
,
2
,
3
]
,
[
4
,
5
,
6
]
]
)
Reference in New Issue
View Git Blame
Copy Permalink