[Haskell-beginners] type of zipWithPlus
russ.abbott at gmail.com
Thu Sep 30 14:59:28 EDT 2010
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.
-- Russ Abbott
Professor, Computer Science
California State University, Los Angeles
Google voice: 424-242-USA0 (last character is zero)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners