scala> /////////////////////////////////////////////////////////// scala> // Multilist processing #367 scala> /////////////////////////////////////////////////////////// scala> scala> // zipped scala> val l1 = List(1, 2, 3, 4) l1: List[Int] = List(1, 2, 3, 4) scala> val l2 = List(10, 11, 12) l2: List[Int] = List(10, 11, 12) scala> // Note here : zipped is a method of Tuple scala> val res = (l1, l2).zipped.map(_ + _) res: List[Int] = List(11, 13, 15) scala> scala> // forall() scala> val l1 = List(1, 2, 3, 11, 13) l1: List[Int] = List(1, 2, 3, 11, 13) scala> val l2 = List(1, 2, 3, 7) l2: List[Int] = List(1, 2, 3, 7) scala> val res = (l1, l2).zipped.forall(_ == _) res: Boolean = false scala> scala> val l1 = List(1, 2, 3, 11, 13) l1: List[Int] = List(1, 2, 3, 11, 13) scala> val l2 = List(1, 2, 3, 11) l2: List[Int] = List(1, 2, 3, 11) scala> val res = (l1, l2).zipped.forall(_ == _) res: Boolean = true scala> scala> // exists() scala> val l1 = List(1, 2, 3, 11, 13) l1: List[Int] = List(1, 2, 3, 11, 13) scala> val l2 = List(1, 2, 3, 7) l2: List[Int] = List(1, 2, 3, 7) scala> val res = (l1, l2).zipped.exists(_ == _) res: Boolean = true scala> scala> val l1 = List(1, 2, 3, 11, 13) l1: List[Int] = List(1, 2, 3, 11, 13) scala> val l2 = List(8, 9, 17, 15) l2: List[Int] = List(8, 9, 17, 15) scala> val res = (l1, l2).zipped.exists(_ == _) res: Boolean = false scala> scala> //Note : We have similar methods in First order methods scala> // in List