Algebraische Datentypen

data Foo = Foo { bar :: Int, baz :: String } 
    deriving Show
Bezeichnungen (benannte Notation)
x :: Foo
x = Foo { bar = 3, baz = "hal" }
Bezeichnungen (positionelle Notation)
data Foo = Foo Int String  
y = Foo 3 "bar"



Johannes Waldmann 2013-06-11