Folien zur Einführung in Haskell
Folien zur Einführung in Haskell
Folien zur Einführung in Haskell
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
Beispiele<br />
Str<strong>in</strong>gs s<strong>in</strong>d <strong>in</strong> <strong>Haskell</strong> als Typsynonym für Listen von Zeichen<br />
def<strong>in</strong>iert:<br />
type Str<strong>in</strong>g = [Char]<br />
Vere<strong>in</strong>igung zweier Typen:<br />
data Either a b = Left a | Right b<br />
Tupel mit Mixfixnotation:<br />
data (,) a b = (,) a b -- oder (a, b)<br />
data (,,) a b c = (,,) a b c -- oder (a, b, c)<br />
20 / 43