How can i use zipWith
with my own functions? I want to add square of numbers from two lists. Until now i have this:
zipWith' :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith' _ [] _ = []
zipWith' _ _ [] = []
zipWith' f (x:xs) (y:ys) = f x y : zipWith' f xs ys
func3 :: (Int, Int) -> Int
func3 (x, y) = x^2 + y^2
I'm not really sure how this should be implemented, but when i write this
zipWith' (func3) [12, 22] [12, 20]
this shows up Variable not in scope: func3 :: a0 -> b0 -> c