Hi,
The following function generates a type error.
headColumnwise :: [a] -> a
headColumnwise line = [ head line | line <- p ]
ERROR ch6ex1.hs:14 - Inferred type is not general enough
*** Expression : headColumnwise
*** Expected type : [a] -> a
*** Inferred type : [[a]] -> [a]
If I change the type of the function to
[[a]] -> [a]
it compiles fine. Isn't [a]->a the most general type here?
Thanks
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell