scala> (List(1,2,3),List(4,5,6),List(7,8,9)).zipped.toList
res0: List[(Int, Int, Int)] = List((1,4,7), (2,5,8), (3,6,9))
For future reference.
More Related Contents:
- To check whether my list fulfils the parameters set out in nested loop in scala function
- What is Scala’s yield?
- What is the difference between Scala’s case class and class?
- What is the motivation for Scala assignment evaluating to Unit rather than the value assigned?
- Difference between reduce and foldLeft/fold in functional programming (particularly Scala and Scala APIs)?
- Abort early in a fold
- What is the difference between def foo = {} and def foo() = {} in Scala?
- Scala currying vs partially applied functions
- val-mutable versus var-immutable in Scala
- Using Either to process failures in Scala code
- When to use parenthesis in Scala infix notation
- When and why should one use Applicative Functors in Scala
- Function returns an empty List in Spark
- Functional programming, Scala map and fold left [closed]
- What is a function literal in Scala?
- How to sort a list in Scala by two fields?
- Cross product in Scala
- Functional Reactive Programming in Scala [closed]
- Using partial functions in Scala – how does it work?
- What is the difference between a var and val definition in Scala?
- What is the apply function in Scala?
- How to import build.gradle into IntelliJ
- Scala 2.8 collections design tutorial
- Parsing multiline records in Scala
- How to extend a Scala list to enable slicing not by explicit position but by given predicate/condition
- Find prime numbers using Scala. Help me to improve
- How to write a proper null-safe coalescing operator in scala?
- Can’t access Parent’s Members while dealing with Macro Annotations
- Why is join not possible after show operator?
- Scala asInstanceOf with parameterized types