:: Int -> [a] -> [[a]] package:slist

O(n). Splits a list into components of the given length. The last element may be shorter than the other chunks, depending on the length of the input.
>>> listChunksOf 3 [0..7]
[[0,1,2],[3,4,5],[6,7]]

>>> listChunksOf 0 [0..10]
[]

>>> listChunksOf (-13) [0..10]
[]

>>> listChunksOf 100 [1,2,3]
[[1,2,3]]
>>> P.take 2 $ listChunksOf 3 [1..]
[[1,2,3],[4,5,6]]