Created
October 30, 2014 02:47
-
-
Save revirth/edb24f1b8f67f1ee10f4 to your computer and use it in GitHub Desktop.
ZipToListMoreThan2Elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2개 이상의 요소를 List로 만들기 | |
(List(1,2,3),List(4,5,6),List(7,8,9)).zipped.toList // List((1,4,7), (2,5,8), (3,6,9)) | |
(List(1,2,3),List("a","b","c"),List("!","@","#")).zipped.toList // List((1,a,!), (2,b,@), (3,c,#)) | |
// http://stackoverflow.com/questions/1664439/can-i-zip-more-than-two-lists-together-in-scala |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment