I wrote a zip function to group the list as follows: scala> def zipListBySize[T](size: Int)(list: List[T]) : List[List[T]] = { | var (first, second) = list.splitAt(size) | if (second == Nil) | List(first) | else | List(first) ++ zipListBySize(size)(second) | } zipListBySize: [T](Int)(List[T])List[List[T]]
scala> zipListBySize(5)(List ("1","2","3","4","5","6","7","8","9","10","11")) res17: List[List[java.lang.String]] = List(List(1, 2, 3, 4, 5), List (6, 7, 8, 9, 10), List(11)) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---