VL1: translate into german

This commit is contained in:
Julian Ospald
2015-04-23 22:40:13 +02:00
parent de46c5c18c
commit 19abcc037e
44 changed files with 215 additions and 210 deletions

View File

@@ -1,11 +1,11 @@
But we can do more than enumerations. How about we do some error handling? Let's say we want a function to return an \hinline{Int}, but in case something went horribly wrong, we don't just want to return a 0 or some magic number, but a proper error message. Here we go:
\ifger{Wir können natürlich auch mehr als nur Enumerationen. Wie wäre es mit Fehlerbehandlung? Z.B. wollen wir eine Funktion, die einen Int zurückgibt, aber falls etwas schief gelaufen ist wollen wir nicht einfach nur eine 0 oder einen magischen Wert, sondern eine richtige Fehlernachricht zurückgeben:}{But we can do more than enumerations. How about we do some error handling? Let's say we want a function to return an \hinline{Int}, but in case something went horribly wrong, we don't just want to return a 0 or some magic number, but a proper error message. Here we go:}
\pause
\begin{haskellcode}
data MaybeInt = NoError Int
| Error String
\end{haskellcode}
\pause
So constructors are just \emph{functions}! And they can have arguments, just like functions. Let's check their types:
\ifger{D.h. Konstruktoren sind auch gewöhnliche \emph{Funktionen}! Und sie können Argumente haben, genau wie Funktionen. Hier ist die Typsignatur:}{So constructors are just \emph{functions}! And they can have arguments, just like functions. Let's check their types:}
\begin{haskellcode}
> :t NoError
NoError :: Int -> MaybeInt