The method you are looking for is "grouped." A slight difference from the split function is that it returns an Iterator of lists, not a list of lists. This may be good, or you may need to convert it using the Iterator.toList function
val list = List(1, 2, 3, 4, 5) println(list.grouped(2).toList)
Dave griffith
source share