Name: Anonymous 2007-12-05 17:37
WTF IS POLYMORPHISM?!
data Data= String String | Bool Bool
f :: Data -> ()
-- Dispatch on the type of the arguments
f (String _) = {- Stuff -} ()
f (Bool _) = {- Stuff -} ()class Class a where
f :: a -> ()
instance Class String where
f _ = {- Stuff -} ()
instance Class Bool where
f _ = {- Stuff -} ()