main = print $ mysum [1,2] mysum :: Num a => [a] => a -- Notice => after the list [a] mysum [] = 0 mysum (x:xs) = x + mysum xs