What is Scalas Product.productIterator supposed to do?
Can someone tell me why I am getting different results when using Tuple2[List,List] and List[List] as my Product in the code below? Specifically I would like to know why the second value of the list of lists gets wrapped in another list? scala> val a = List(1,2,3) a: List[Int] = List(1, 2, 3) scala> val b = List(4,5,6) b: List[Int] = List(4, 5, 6) scala> val c = List(a,b) c: List[List[Int]] = List(List(1, 2, 3), List(4, 5, 6)) scala> c.productIterator.foreach( println(_) ) List(1, 2, 3) List(List(4, 5, 6)) // <-- Note this scala> val d = (a,b) d: (List[Int], List[Int]) = (List(1, 2, 3),List(4,