add_lists list1 list2: returns the sum of the elements in the same position in each list as a new list. If one list is shorter than the other, assume that the shorter list has zero’s in the “missing places”. This is my haskell code :
add_lists list1 list2= if length.list1 < length.list2
then list2 ++ [i] && zipWith(+)list1 list2
else zipWith (+) list1 list2
where [i|i=0,i=length.list2-length.list1]
I keep getting errors