I thinking I've got the idea how to solve the problem.
Basically I need to turn this list [1,2,3,4,5] into this
I wrecked my brain and couldn't come up with the solution so I picked at yours and tried the slice function separately.
slice b m
| length b >= m = take m b : slice (tail b)
| otherwise = 
But the ghci yells at me:
• Couldn't match type ‘Int -> [[a]]’ with ‘[[a]]’
Expected type: [a] -> [[a]]
Actual type: [a] -> Int -> [[a]]
• Relevant bindings include
slice :: [a] -> [a]
Failed, modules loaded: none.
Now I see I called slice only on one argument.
It should have been slice (tail b) m.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.