Skip to content

Instantly share code, notes, and snippets.

@revirth
Created October 30, 2014 02:47
Show Gist options
  • Save revirth/edb24f1b8f67f1ee10f4 to your computer and use it in GitHub Desktop.
Save revirth/edb24f1b8f67f1ee10f4 to your computer and use it in GitHub Desktop.
ZipToListMoreThan2Elements
// 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