Brian Hulley wrote:
Taral wrote:
I have no idea what kind of function would have type (a -> b & c ->
d). Can you give an example?
g x = x
because g 3 = 3 so g has type Int -> Int but also g 'a' = 'a' so g
has type Char -> Char hence g has type Int -> Int & Char -> Char
Actually I should have said "g's type *matches* (Int->Int & Char->Char)"
since of course g has type a->a.
Regards, Brian.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe