> general f x = f x x > double = general (+) > > The system infers the types: > > general:: (a -> a -> b) -> a -> b > general (+):: Num a => a -> a > > but > double:: Integer -> Integer > > > How is this possible? > > Thank you in advance! Dreaded monomorphism restriction :-) Try defining double as double x = general (+) x Alas, that's the way it is. Erik
- A question about Hugs 98 Hermo Huguet. Montse
- Erik Meijer
