lstsAdder :: [[Integer]] -> [Integer]
lstsAdder [] = []
lstsAdder (x:xs) = zipWith (+) x (lstsAdder xs)
As the title says, I want it to recursively add this: [[a,b,c],[d,e,f]]
like this: [a+d,b+e,c+f]
, and this with lists of lists of any finite length. But all my implementation returns is []
. Why is that, and how do I fix it?