While I can say A), what I really need is B)
A) > take 5 $ chunksOf 10 [0..]
[[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29],[30,31,32,33,34,35,36,37,38,39],[40,41,42,43,44,45,46,47,48,49]]
B) > take 5 $ someFn 10 1 [0..]
[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9,10],[2,3,4,5,6,7,8,9,10,11],[3,4,5,6,7,8,9,10,11,12],[4,5,6,7,8,9,10,11,12,13]]
The music theory package indeed has a working partition function (
source here). The implementation simply
i) takes `n` from the source list,
ii) drops by `m` then recurses.
segments :: Int -> Int -> [a] -> [[a]]
in if length q /= n then [] else q : segments n m p'