Is there an operation on lists in library that makes groups of n elements? For example: n=3
groupInto 3 [1,2,3,4,5,6,7,8,9] = [[1,2,3],[4,5,6],[7,8,9]]
This function, among other similar ones, can be found in the popular split package.
> import Data.List.Split > chunksOf 3 [1,2,3,4,5,6,7,8,9] [[1,2,3],[4,5,6],[7,8,9]]