So here I have the following on GHCI
>let addlist [] [] = []
>let addlist (a:as) (b:bs) = (a+b) : addlist as bs
>let x = [1..5]
>let y = [6..10]
>addlist x y
The last line gives me: [7,9,11,13,15*** Exception: :1:5-49: Non-exhaustive patterns in function addlist
I am merely trying to add two list together into one list...:(
What did I do wrong?
Thanks
let addlist = zipWith (+)