
30 Sep
2010
30 Sep
'10
6:59 p.m.
When I define zipWithPlus at the top level of GHCi, the type is as shown.
let zipWithPlus = zipWith (+) zipWithPlus :: [Integer] -> [Integer] -> [Integer]
Why isn't it: (Num a) => a -> a-> a I was unable to find a way to get the type to be more general. I tried various declarations within the let using (Num a) => a -> a-> a but none of them were accepted. Thanks. -- Russ Abbott ______________________________________ Professor, Computer Science California State University, Los Angeles Google voice: 424-242-USA0 (last character is zero) blog: http://russabbott.blogspot.com/ vita: http://sites.google.com/site/russabbott/ ______________________________________