When given a starting number and an increment, I want to be able to create a lists of lists in Haskell.
For example:
>listIncrease 5 3
[[5], [5,6], [5,6,7]]
I have tried using a recursive function but I haven't been able to get the function just right.
This is what I currently have:
listIncrease :: Int -> Int -> [[Int]]
listIncrease a 0 = []
listIncrease a b = [[a..a+b-1], (listIncrease a (b-2))]
I know this won't work because of the base case and because of the base case being incorrect, and the recursive step because you can't take an [[Int]] to be an [Int].