Browse Source

VL2: translate into german

Julian Ospald 4 years ago
parent
commit
f7eda19f1f
No account linked to committer's email address

+ 2
- 2
VL2/VL2.tex View File

@@ -5,14 +5,14 @@
5 5
 % title page information
6 6
 \author{Julian Ospald}
7 7
 \institute{FH Bielefeld}
8
-\title{Haskell: higher order functions}
8
+\title{Haskell: \ifger{Funktionen höherer Ordnung}{higher order functions}}
9 9
 
10 10
 \begin{document}
11 11
 
12 12
 \frame{\titlepage}
13 13
 
14 14
 \begin{frame}
15
-\frametitle{Table of Contents}
15
+\frametitle{\ifger{Inhaltsverzeichnis}{Table of Contents}}
16 16
 \tableofcontents[hidesubsections=true]
17 17
 \end{frame}
18 18
 

+ 20
- 17
VL2/VL2_document_structure.tex View File

@@ -1,11 +1,11 @@
1
-\section{Reiteration}
1
+\section{\ifger{Rückblick}{Reiteration}}
2 2
 
3 3
 \slidetoc
4 4
 
5 5
 \slide{./content/VL2_reiteration.tex}
6 6
 
7 7
 
8
-\section{Polymorphism}
8
+\section{\ifger{Polymorphie}{Polymorphism}}
9 9
 
10 10
 \slidetoc
11 11
 
@@ -13,7 +13,7 @@
13 13
 \slide{./content/VL2_polymorphism2.tex}[ (cnt.)]
14 14
 
15 15
 
16
-\section{More ways to define functions}
16
+\section{\ifger{Andere Arten der Funktionsdefinition}{More ways to define functions}}
17 17
 
18 18
 \slidetoc
19 19
 
@@ -31,7 +31,7 @@
31 31
 
32 32
 \slide{./content/VL2_let_vs_where.tex}
33 33
 
34
-\subsection{Anonymous functions}
34
+\subsection{\ifger{Anonyme Funktionen}{Anonymous functions}}
35 35
 
36 36
 \slide{./content/VL2_anonymous_functions.tex}
37 37
 
@@ -45,26 +45,26 @@
45 45
 
46 46
 \slide{./content/VL2_currying2.tex}
47 47
 
48
-\subsection{Mathematical example}
48
+\subsection{\ifger{Mathematisches Beispiel}{Mathematical example}}
49 49
 \slide{./content/VL2_currying3.tex}
50 50
 
51
-\subsection{Geometrical example}
51
+\subsection{\ifger{Geometrisches Beispiel}{Geometrical example}}
52 52
 \slide{./content/VL2_currying4.tex}
53 53
 
54
-\subsection{Conclusion}
54
+\subsection{\ifger{Schlussfolgerung}{Conclusion}}
55 55
 \slide{./content/VL2_currying5.tex}
56 56
 
57 57
 \subsection{Partial application}
58 58
 \slide{./content/VL2_currying6.tex}
59 59
 
60
-\subsection{Curry and Uncurry}
60
+\subsection{Curry \ifger{und}{and} Uncurry}
61 61
 \slide{./content/VL2_currying7.tex}
62 62
 
63
-\subsection{Summary}
63
+\subsection{\ifger{Zusammenfassung Currying}{Summary currying}}
64 64
 \slide{./content/VL2_currying8.tex}
65 65
 
66 66
 
67
-\section{Function composition}
67
+\section{\ifger{Funktionskomposition}{Function composition}}
68 68
 
69 69
 \slidetoc
70 70
 
@@ -73,7 +73,7 @@
73 73
 \slide{./content/VL2_composition3.tex}[ (cnt.)]
74 74
 
75 75
 
76
-\section{Recursion patterns}
76
+\section{\ifger{Rekursionsstrukturen}{Recursion patterns}}
77 77
 
78 78
 \slidetoc
79 79
 
@@ -99,22 +99,25 @@
99 99
 \slide{./content/VL2_fold2.tex}[ (cnt.)]
100 100
 \slide{./content/VL2_fold3.tex}[ (cnt.)]
101 101
 \slide{./content/VL2_fold4.tex}[ (cnt.)]
102
-\slide{./content/VL2_fold5.tex}[ (cnt.)]
103 102
 
103
+\subsection{\ifger{Zusammenfassung Rekurssionsstrukturen}{Summary recursion patterns}}
104 104
 
105
-\section{Reflection}
105
+\slide{./content/VL2_fold5.tex}
106
+
107
+
108
+\section{\ifger{Reflexion}{Reflection}}
106 109
 
107 110
 \slidetoc
108 111
 
109
-\subsection{What you should know}
112
+\subsection{\ifger{Was Sie wissen sollten}{What you should know}}
110 113
 
111 114
 \slide{./content/VL2_what_you_should_know.tex}
112 115
 
113
-\subsection{Questions for you}
116
+\subsection{\ifger{Fragen an Sie}{Questions for you}}
114 117
 
115 118
 \slide{./content/VL2_questions_for_you.tex}
116 119
 
117
-\section{References}
120
+\section{\ifger{Referenzen}{References}}
118 121
 
119 122
 \slidetoc
120 123
 
@@ -122,6 +125,6 @@
122 125
 
123 126
 \slide{../common/content/VL_links.tex}
124 127
 
125
-\subsection{Sources}
128
+\subsection{\ifger{Quellen}{Sources}}
126 129
 
127 130
 \slide{../common/content/VL_sources.tex}

+ 1
- 1
VL2/VL2_handout.tex View File

@@ -6,7 +6,7 @@
6 6
 
7 7
 % title page information
8 8
 \author{Julian Ospald}
9
-\title{Haskell: higher order functions}
9
+\title{Haskell: \ifger{Funktionen höherer Ordnung}{higher order functions}}
10 10
 
11 11
 \maketitle
12 12
 

+ 3
- 3
VL2/content/VL2_anonymous_functions.tex View File

@@ -1,12 +1,12 @@
1
-We can also have \textbf{anonymous functions} which just means the function doesn't have a name:
1
+\ifger{Wir können auch \textbf{anonyme Funktionen} haben, was eigentlich nur bedeutet, dass die Funktion keinen Namen hat:}{We can also have \textbf{anonymous functions} which just means the function doesn't have a name:}
2 2
 \begin{haskellcode}
3 3
 f :: Int -> Int
4 4
 f x = (\y -> y + 1) x
5 5
 \end{haskellcode}
6 6
 \pause
7
-Although this is basically the same as:
7
+\ifger{Wobei dies praktisch dasselbe ist wie:}{Although this is basically the same as:}
8 8
 \begin{haskellcode}
9 9
 f :: Int -> Int
10 10
 f x = x + 1
11 11
 \end{haskellcode}
12
-Anonymous functions will come extremely handy later, you'll see.
12
+\ifger{Anonyme Funktionen werden für uns später sehr nützlich sein.}{Anonymous functions will come extremely handy later, you'll see.}

+ 3
- 3
VL2/content/VL2_composition1.tex View File

@@ -1,12 +1,12 @@
1
-So why did we just bother so long with explaining currying? It's because it's very important for \emph{function composition}. Which again is also one of the fundamental concepts of functional programming.
1
+\ifger{Wieso haben wir uns so lange mit Currying aufgehalten? Nun, es ist wie gesagt sehr wichtig für \emph{Funktionskomposition}. Sie zählt ebenfalls zu den fundamentalen Basiskonzepten der funktionalen Programmierung.}{So why did we just bother so long with explaining currying? It's because it's very important for \emph{function composition}. Which again is also one of the fundamental concepts of functional programming.}
2 2
 \vspace{\baselineskip}
3 3
 \\
4
-From maths we already know that:\\
4
+\ifger{Aus der Mathematik wissen wir bereits, dass:}{From maths we already know that:}\\
5 5
 $(g \circ f)(x) = g(f(x))$
6 6
 \vspace{\baselineskip}
7 7
 \\
8 8
 \pause
9
-And that's basically it. We do the same in haskell, it looks like this:
9
+\ifger{Und das ist praktisch schon alles. Wir machen dasselbe in Haskell:}{And that's basically it. We do the same in haskell, it looks like this:}
10 10
 \begin{haskellcode}
11 11
 composedFunction x = (f . g) x
12 12
 

+ 4
- 4
VL2/content/VL2_composition2.tex View File

@@ -1,17 +1,17 @@
1
-But let's not stop here. What does the dot \hinline{(.)} actually mean?
1
+\ifger{Aber das soll uns nicht genug sein. Was bedeutet dieser Punkt \hinline{(.)} tatsächlich?}{But let's not stop here. What does the dot \hinline{(.)} actually mean?}
2 2
 \vspace{\baselineskip}
3 3
 \\
4 4
 \pause
5
-It's just a function (the \emph{prefix} version of \hinline{.})! Here is the type signature:
5
+\ifger{Es ist einfach nur eine Funktion (die \emph{Prefix} Variante von \hinline{.})!}{It's just a function (the \emph{prefix} version of \hinline{.})! Here is the type signature:}
6 6
 \begin{haskellcode}
7 7
 (.) :: (b -> c) -> (a -> b) -> a -> c
8 8
 \end{haskellcode}
9 9
 \pause
10
-\textbf{Exercise:} Implement it! It's really just one line! Remember the mathematical definition.
10
+\textbf{\ifger{Aufgabe:}{Exercise:}} \ifger{Implementiert es! Es ist tatsächlich nur eine Zeile. Erinnert Euch an die mathematische Definition.}{Implement it! It's really just one line! Remember the mathematical definition.}
11 11
 \vspace{\baselineskip}
12 12
 \\
13 13
 \pause
14
-Solution:
14
+\ifger{Lösung:}{Solution:}
15 15
 \begin{haskellcode}
16 16
 (.) :: (b -> c) -> (a -> b) -> a -> c
17 17
 (.) f g x = f (g x)

+ 6
- 6
VL2/content/VL2_composition3.tex View File

@@ -1,4 +1,4 @@
1
-And now you can chain functions together. Not just two! Look:
1
+\ifger{Und jetzt können wir Funktionen verketten, egal wieviele:}{And now you can chain functions together. Not just two! Look:}
2 2
 \begin{haskellcode}
3 3
 f :: String -> Bool
4 4
 f xs = (even . length . (\x -> x ++ "Hello world")) xs
@@ -7,7 +7,7 @@ f xs = even . length . (\x -> x ++ "Hello world") $ xs
7 7
 \end{haskellcode}
8 8
 % $
9 9
 \pause
10
-Another example where currying is actually important:
10
+\ifger{Ein anderes Beispiel, bei dem Currying tatsächlich relevant ist:}{Another example where currying is actually important:}
11 11
 \begin{haskellcode}
12 12
 f :: Int -> Bool
13 13
 f x = even . (+) 3 . (-) 4 $ x
@@ -17,9 +17,9 @@ f x = even . (+) 3 . (-) $ 4 x
17 17
 \end{haskellcode}
18 18
 %$
19 19
 \pause
20
-So there are a few things that we have to be aware of:
20
+\ifger{Aber es gilt hier einige wichtige Dinge zu beachten:}{So there are a few things that we have to be aware of:}
21 21
 \begin{itemize}
22
-\item the types have to fit!
23
-\item the arity has to fit!
22
+\item \ifger{die Typen müssen passen!}{the types have to fit!}
23
+\item \ifger{die Arität muss passen!}{the arity has to fit!}
24 24
 \end{itemize}
25
-That sounds complicated at first, because it counts for the whole composition chain. But you'll get used to it.
25
+\ifger{Das klingt anfangs kompliziert, weil es für die gesamte Verkettung gilt, aber man kommt sehr schnell rein.}{That sounds complicated at first, because it counts for the whole composition chain. But you'll get used to it.}

+ 3
- 3
VL2/content/VL2_currying1.tex View File

@@ -1,13 +1,13 @@
1
-This is what actually makes haskell such a fine functional language. You might have noticed that I tried hard to not show type signatures of functions that have more than one argument. Well, that's because we have to dig a little deeper to explain what comes next:
1
+\ifger{Dies ist, was aus Haskell eine so wunderbare funktionale Sprache macht. In der letzten Vorlesung habe ich bewusst vermieden Funktionen mit mehreren Argumenten zu zeigen. Das liegt daran, dass wir ein bisschen weiter ausholen müssen für das, was jetzt kommt:}{This is what actually makes haskell such a fine functional language. You might have noticed that I tried hard to not show type signatures of functions that have more than one argument. Well, that's because we have to dig a little deeper to explain what comes next:}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 addInt :: Int -> Int -> Int
5 5
 addInt x y = x + y
6 6
 \end{haskellcode}
7 7
 \pause
8
-So, what is happening here? You probably expected something like:
8
+\ifger{Was ist hier passiert? Eher hätte man vermutlich sowas erwartet:}{So, what is happening here? You probably expected something like:}
9 9
 \begin{haskellcode}
10 10
 addInt :: (Int, Int) -> Int
11 11
 addInt (x, y) = x + y
12 12
 \end{haskellcode}
13
-which is actually pretty close.
13
+\ifger{was im Grunde der Sache sogar recht nahe kommt.}{which is actually pretty close.}

+ 2
- 2
VL2/content/VL2_currying2.tex View File

@@ -1,4 +1,4 @@
1
-Currying is sort of a mathematical thing and is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple) into evaluating a sequence of functions, each with a single argument.
1
+\ifger{Currying ist eigentlich eine mathematische Sache und ist auf wikipedia wie folgt definiert: }{Currying is sort of a mathematical thing and is defined on wikipedia as:} \\''Currying is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple) into evaluating a sequence of functions, each with a single argument.'' -- Wikipedia
2 2
 \vspace{\baselineskip}
3 3
 \\
4
-Let that sink in a little bit and read it again.
4
+\ifger{Darüber müssen wir erstmal nachdenken.}{Let that sink in a little bit and read it again.}

+ 5
- 5
VL2/content/VL2_currying3.tex View File

@@ -1,18 +1,18 @@
1
-Maybe a mathematical example will make things clearer. Let's say we have the function:\\
1
+\ifger{Vielleicht hilft ein mathematisches Beispiel die Dinge klarer zu machen. Wir haben z.b. folgende Funktion:}{Maybe a mathematical example will make things clearer. Let's say we have the function:}\\
2 2
 $f(x, y) = y / x$
3 3
 \vspace{\baselineskip}
4 4
 \\
5 5
 \pause
6
-In order to evaluate the function for $x = 2$ and $y = 3$ we would do:\\
6
+\ifger{Um diese Funktion für $x = 2$ und $y = 3$ zu berechnen würden wir einfach einsetzen:}{In order to evaluate the function for $x = 2$ and $y = 3$ we would do:}\\
7 7
 $f(2, 3) = 2 / 3$\\
8
-and be done.
8
+\ifger{und fertig sein.}{and be done.}
9 9
 \vspace{\baselineskip}
10 10
 \\
11 11
 \pause
12
-However, how about we just put in x first and make a new function. Since x is gone, we can write:\\
12
+\ifger{Allerdings, wie wäre es wenn wir nur für $x$ einsetzen und dadurch eine neue Funktion definieren. Da $x$ weg ist, können wir schreiben:}{However, how about we just put in $x$ first and make a new function. Since $x$ is gone, we can write:}\\
13 13
 $g(y) = f(2, y) = y / 2$
14 14
 \vspace{\baselineskip}
15 15
 \\
16 16
 \pause
17
-And in a second step we solve the function $g(y)$:\\
17
+\ifger{Und erst in einem zweiten Schritt lösen wir die Gleichung indem wir $y$ in $g(y)$ einsetzen:}{And in a second step we solve the function $g(y)$:}\\
18 18
 $g(3) = f (2, 3) = 3 / 2$

+ 3
- 3
VL2/content/VL2_currying4.tex View File

@@ -1,7 +1,7 @@
1
-You can also imagine this geometrically:\\
2
-$z = f(x, y)$ is 3-dimensional. If you fix the variable $x$ you'll make things 2-dimensional (the intersecting plane). If you then fix $y$ you'll get an actual point $z$.
1
+\ifger{Wir können uns das ganze auch geometrisch vorstellen:}{You can also imagine this geometrically:}\\
2
+$z = f(x, y)$ \ifger{ist}{is} 3-dimensional. \ifger{Wenn wir für die Variable $x$ einsetzen bekommen wir im Grunde eine 2-dimensionale Funktion (die Schnittebene). Wenn wir dann für $y$ einsetzen, bekommen wir den eigentlich Punkt $z$.}{If you fix the variable $x$ you'll make things 2-dimensional (the intersecting plane). If you then fix $y$ you'll get an actual point $z$.}
3 3
 \vspace{\baselineskip}
4 4
 \\
5 5
 \includegraphics*[scale=0.4]{./images/Grafico_3d_x2+xy+y2.png}
6 6
 \\
7
-For every of these steps we can define a real new function. This scales up to any number of dimensions/arguments.
7
+\ifger{Für jeden dieser Schritte können wir eine echte neue Funktion definieren. Das funktioniert mit einer beliebigen Anzahl von Dimensionen/Argumenten.}{For every of these steps we can define a real new function. This scales up to any number of dimensions/arguments.}

+ 4
- 4
VL2/content/VL2_currying5.tex View File

@@ -1,14 +1,14 @@
1
-So in mathematical terms you can say:\\
1
+\ifger{D.h. mathematisch gesehen können wir schreiben:}{So in mathematical terms you can say:}\\
2 2
 $f : A_1 \times ... \times A_n \mapsto B$
3 3
 \vspace{\baselineskip}
4 4
 \\
5
-gets modified into:\\
5
+\ifger{wird zu}{gets modified into:}\\
6 6
 \pause
7 7
 $f' : A_1 \mapsto (A_2 \mapsto (\ ...\ (A_n \mapsto B)))$
8 8
 \vspace{\baselineskip}
9 9
 \\
10 10
 \pause
11
-Did you just notice the braces? They are \textbf{very} important! So, currying is \emph{right}-associative which means that these two signatures are equivalent:
11
+\ifger{Die Klammern hier sind äußerst wichtig! Currying ist \emph{rechts}-assoziativ, d.h. die folgenden 2 Typsignaturen in Haskell sind äquivalent:}{Did you just notice the braces? They are \textbf{very} important! So, currying is \emph{right}-associative which means that these two signatures are equivalent:}
12 12
 \begin{haskellcode}
13 13
 f :: Int -> Int -> Int
14 14
 f :: Int -> (Int -> Int)
@@ -16,4 +16,4 @@ f :: Int -> (Int -> Int)
16 16
 -- but this is NOT the same
17 17
 f :: (Int -> Int) -> Int
18 18
 \end{haskellcode}
19
-On the other hand function application is \emph{left}-associative, so \hinline{f 3 2} is just a shorthand of \hinline{(f 3) 2}. Makes sense?
19
+\ifger{Auf der anderen Seite ist Funktionsanwendung \emph{links}-assoziativ, d.h.}{On the other hand function application is \emph{left}-associative, so} \hinline{f 3 2} \ifger{ist nur die Kurzform für}{is just a shorthand of} \hinline{(f 3) 2}. \ifger{Macht Sinn?}{Makes sense?}

+ 4
- 4
VL2/content/VL2_currying6.tex View File

@@ -1,4 +1,4 @@
1
-What does that mean for us? It's not just fun stuff or aesthetic. It allows us to do \textbf{partial application}. That means we do not have to give a function all arguments. If we pass an "insufficient" number of arguments it will just give us a new function! Here:
1
+\ifger{Was bedeutet das für uns? Es ermöglicht uns \textbf{partial application}, was bedeutet, dass wir einer Funktion nicht alle Argumente übergeben müssen. Wenn wir ''zu wenig'' Argumente übergeben, wird einfach eine neue Funktion generiert. Z.b. so:}{What does that mean for us? It's not just fun stuff or aesthetic. It allows us to do \textbf{partial application}. That means we do not have to give a function all arguments. If we pass an "insufficient" number of arguments it will just give us a new function! Here:}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 addInt :: Int -> Int -> Int
@@ -7,13 +7,13 @@ addInt x y = x + y
7 7
 addTwo :: Int -> Int
8 8
 addTwo = addInt 2
9 9
 \end{haskellcode}
10
-You probably noticed that we did not write \hinline{addTwo x = ...}, but why would we? We gave \hinline{addInt} one argument, so the arity (we called it dimension in the gemoetrical example) is one less, but there is still one parameter left we can pass in.
10
+\ifger{Warum haben wir nicht \hinline{addTwo x = ...} geschrieben? Wieso sollten wir? Wir haben \hinline{addInt} ein Argument übergeben, also ist die Arität (im Beispiel vorher Dimension) einer weniger und damit ist noch ein Argument notwendig um den endgültigen Wert zu bekommen.}{You probably noticed that we did not write \hinline{addTwo x = ...}, but why would we? We gave \hinline{addInt} one argument, so the arity (we called it dimension in the gemoetrical example) is one less, but there is still one parameter left we can pass in.}
11 11
 \pause
12
-The reason we can omit the \hinline{x} here is that
12
+\ifger{Der Grund warum wir \hinline{x} auslassen können ist, dass}{The reason we can omit the \hinline{x} here is that}
13 13
 \begin{haskellcode}
14 14
 f x y z = ...
15 15
 \end{haskellcode}
16
-is just syntax sugar for
16
+\ifger{nur syntax sugar ist für}{is just syntax sugar for}
17 17
 \begin{haskellcode}
18 18
 f = \x -> (\y -> (\z -> ... )) -- right-associative, ofc
19 19
 \end{haskellcode}

+ 2
- 2
VL2/content/VL2_currying7.tex View File

@@ -1,10 +1,10 @@
1
-As said in the beginning of this section, these two look pretty similar:
1
+\ifger{Wie am Anfang dieses Kapitels bereits gesagts sind diese beiden Funktionen sehr ähnlich:}{As said in the beginning of this section, these two look pretty similar:}
2 2
 \begin{haskellcode}
3 3
 f :: Int -> Int -> Int
4 4
 
5 5
 f :: (Int, Int) -> Int
6 6
 \end{haskellcode}
7
-And we now know that we can convert from one to another. Of course haskell also provides us two functions to do that, here we go:
7
+\ifger{Da wir jetzt wissen, dass man von der einen Form in die andere und zurück konvertieren kann, müssten wir dann nicht auch Funktionen dafür haben? Haben wir:}{And we now know that we can convert from one to another. Of course haskell also provides us two functions to do that, here we go:}
8 8
 \begin{haskellcode}
9 9
 curry :: ((a, b) -> c) -> a -> b -> c
10 10
 

+ 4
- 4
VL2/content/VL2_currying8.tex View File

@@ -1,6 +1,6 @@
1
-So... now that we know what currying is, let's summarize:
1
+\ifger{Zusammenfassend lässt sich über Currying sagen:}{So... now that we know what currying is, let's summarize:}
2 2
 \begin{itemizep}
3
-\item all functions in haskell have only one argument (strictly speaking)
4
-\item if a function seems to have multiple arguments... currying is used behind the scenes to evaluate it
5
-\item currying also allows us to do partial function application (which is important for function composition)
3
+\item \ifger{alle Funktionen in Haskell haben nur ein Argument (streng genommen)}{all functions in haskell have only one argument (strictly speaking)}
4
+\item \ifger{wenn eine Funktion scheinbar mehrere Argumente hat steckt immer Currying dahinter um die Funktion zu evaluieren}{if a function seems to have multiple arguments... currying is used behind the scenes to evaluate it}
5
+\item \ifger{Currying erlaubt uns auch \emph{partial function application} (was auch sehr wichtig für Funktionskomposition ist)}{currying also allows us to do partial function application (which is important for function composition)}
6 6
 \end{itemizep}

+ 4
- 4
VL2/content/VL2_filter1.tex View File

@@ -1,8 +1,8 @@
1
-Imagine we want to filter all even numbers of a list and throw away all others. I'll give you the type signature:
1
+\ifger{Stellen wir uns vor wir wollen alle geraden Zahlen einer Liste und alle anderen nicht. Hier wäre die Typsignatur:}{Imagine we want to filter all even numbers of a list and throw away all others. I'll give you the type signature:}
2 2
 \begin{haskellcode}
3 3
 filterEven :: [Int] -> [Int]
4 4
 \end{haskellcode}
5
-Solution?
5
+\ifger{Lösung?}{Solution?}
6 6
 \pause
7 7
 \begin{haskellcode}
8 8
 filterEven :: [Int] -> [Int]
@@ -12,7 +12,7 @@ filterEven (x:xs)
12 12
   | otherwise = filterEven xs
13 13
 \end{haskellcode}
14 14
 \pause
15
-Or: filter out all 0's, so we can count them later:
15
+\ifger{Oder: wir filtern alle $0$en, damit wir sie später zählen können:}{Or: filter out all $0$'s, so we can count them later:}
16 16
 \begin{haskellcode}
17 17
 filterZero :: [Int] -> [Int]
18 18
 filterZero [] = []
@@ -20,4 +20,4 @@ filterZero (x:xs)
20 20
   | x == 0    = x : filterZero xs
21 21
   | otherwise = filterZero xs
22 22
 \end{haskellcode}
23
-Again: do you notice something?
23
+\ifger{Erneut: Fällt etwas auf?}{Again: do you notice something?}

+ 3
- 3
VL2/content/VL2_filter2.tex View File

@@ -1,8 +1,8 @@
1
-Let's abstract out the common pieces! This will be our type signature:
1
+\ifger{Wir werden die Rekursionsstruktur erneut herausabstrahieren! Die Typsignatur sieht so aus:}{Let's abstract out the common pieces! This will be our type signature:}
2 2
 \begin{haskellcode}
3 3
 filter :: (a -> Bool) -> [a] -> [a]
4 4
 \end{haskellcode}
5
-Solution?
5
+\ifger{Lösung?}{Solution?}
6 6
 \pause
7 7
 \begin{haskellcode}
8 8
 filter :: (a -> Bool) -> [a] -> [a]
@@ -11,4 +11,4 @@ filter f (x:xs)
11 11
   | f x       = x : filter f xs
12 12
   | otherwise = filter f xs
13 13
 \end{haskellcode}
14
-Again: this function is part of the \emph{Prelude} as well.
14
+\ifger{Diese Funktion ist ebenfalls Teil von \emph{Prelude}.}{Again: this function is part of the \emph{Prelude} as well.}

+ 4
- 4
VL2/content/VL2_fold1.tex View File

@@ -1,8 +1,8 @@
1
-There's one more important recursion pattern. Imagine you want the sum of all  numbers of a list, so the function type signature would be:
1
+\ifger{Es gibt noch eine weitere sehr wichtige Rekursionsstruktur. Stellen wir uns vor wir wollen alle Zahlen einer Liste aufsummieren. Die Typsignatur sieht wie folgt aus:}{There's one more important recursion pattern. Imagine you want the sum of all numbers of a list, so the function type signature would be:}
2 2
 \begin{haskellcode}
3 3
 sum :: [Int] -> Int
4 4
 \end{haskellcode}
5
-Solution?
5
+\ifger{Lösung?}{Solution?}
6 6
 \pause
7 7
 \begin{haskellcode}
8 8
 sum :: [Int] -> Int
@@ -10,14 +10,14 @@ sum [] = 0
10 10
 sum (x:xs) = x + sum xs
11 11
 \end{haskellcode}
12 12
 \pause
13
-Or the product:
13
+\ifger{Oder das Produkt:}{Or the product:}
14 14
 \begin{haskellcode}
15 15
 prod :: [Int] -> Int
16 16
 prod [] = 1
17 17
 prod (x:xs) = x * prod xs
18 18
 \end{haskellcode}
19 19
 \pause
20
-Or the length:
20
+\ifger{Oder die Länge:}{Or the length:}
21 21
 \begin{haskellcode}
22 22
 length :: [a] -> Int
23 23
 length [] = 0

+ 7
- 7
VL2/content/VL2_fold2.tex View File

@@ -1,19 +1,19 @@
1
-To cut the story short, the abstract solution looks like this:
1
+\ifger{Um es kurz zu machen, die abstrakte Lösung ist:}{To cut the story short, the abstract solution looks like this:}
2 2
 \begin{haskellcode}
3 3
 fold :: b -> (a -> b -> b) -> [a] -> b
4 4
 fold z f []     = z
5 5
 fold z f (x:xs) = x `f` (fold z f xs)
6 6
 \end{haskellcode}
7 7
 Whoa! What's going on here?\\
8
-Let's see...
8
+\ifger{Schauen wir genauer hin...}{Let's see...}
9 9
 \begin{itemizep}
10
-\item \hinline{z} is what we return if the list is empty
11
-\item \hinline{f} is our function (e.g. \hinline{(*)} or \hinline{(+)})
12
-\item and the last remaining argument is the actual list we are working on
10
+\item \hinline{z} \ifger{ist was die Funktion zurückgibt, wenn die Liste leer ist}{is what we return if the list is empty}
11
+\item \hinline{f} \ifger{ist unsere Funktion}{is our function} (\ifger{z.b.}{e.g.} \hinline{(*)} \ifger{oder}{or} \hinline{(+)})
12
+\item \ifger{das letzte Argument ist die eigentliche Liste, auf der wir arbeiten}{and the last remaining argument is the actual list we are working on}
13 13
 \end{itemizep}
14 14
 \slidep
15
-The function application has the following form:\\
15
+\ifger{Die Funktionsanwendung hat die folgende Form:}{The function application has the following form:}\\
16 16
 \hinline{fold f z [a,b,c] == a `f` (b `f` (c `f` z))}
17 17
 \vspace{\baselineskip}
18 18
 \\
19
-This folds from the right, so the \emph{Prelude} already defines a function which is very similar to ours and called \textbf{foldr}.
19
+\ifger{D.h. hier falten wir von rechts. \emph{Prelude} definiert diese Funktion bereits, die fast genauso ist wie unsere. Sie heisst \textbf{foldr}.}{This folds from the right, so the \emph{Prelude} already defines a function which is very similar to ours and called \textbf{foldr}.}

+ 1
- 1
VL2/content/VL2_fold3.tex View File

@@ -1,4 +1,4 @@
1
-So how do our \hinline{sum}, \hinline{prod} and \hinline{length} functions look like if we use our \hinline{fold} abstraction?
1
+\ifger{Jetzt wollen wir uns unsere Funktionen}{So how do our} \hinline{sum}, \hinline{prod} \ifger{und}{and} \hinline{length} \ifger{anschauen, wenn wir sie mittels \hinline{fold} implementieren:}{functions look like if we use our \hinline{fold} abstraction?}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 sum :: [Int] -> Int

+ 5
- 5
VL2/content/VL2_fold4.tex View File

@@ -1,17 +1,17 @@
1
-There is also a function that folds from the \emph{left} which is also in the \emph{Prelude} and called \textbf{foldl}.\\
2
-To summarize:
1
+\ifger{Es gibt auch eine Funktion die von \emph{links} faltet und ebenfalls in \emph{Prelude} ist. Sie heisst \textbf{foldl}.}{There is also a function that folds from the \emph{left} which is also in the \emph{Prelude} and called \textbf{foldl}.}\\
2
+\ifger{Zusammenfassend:}{To summarize:}
3 3
 \begin{haskellcode}
4 4
 foldr f z [a,b,c] == a `f` (b `f` (c `f` z))
5 5
 foldl f z [a,b,c] == ((z `f` a) `f` b) `f` c
6 6
 \end{haskellcode}
7
-For \hinline{foldl} the \hinline{z} is sort of the starting value.
7
+\ifger{Für}{For} \hinline{foldl} \ifger{ist}{the} \hinline{z} \ifger{quasi der Startwert.}{is sort of the starting value.}
8 8
 \vspace{\baselineskip}
9 9
 \\
10 10
 \pause
11
-We can even express foldl in terms of foldr and vice versa. If you are interested, have a look here:\\ \url{http://lambda.jstolarek.com/2012/07/expressing-foldl-in-terms-of-foldr/}
11
+\ifger{Wir können sogar foldl mittels foldr ausdrücken und umgekehrt. Wer interessiert daran ist, sollte hier\footnote{\url{http://lambda.jstolarek.com/2012/07/expressing-foldl-in-terms-of-foldr}} weiterlesen.}{We can even express foldl in terms of foldr and vice versa. If you are interested, have a look here\footnote{\url{http://lambda.jstolarek.com/2012/07/expressing-foldl-in-terms-of-foldr}}.} 
12 12
 \vspace{\baselineskip}
13 13
 \\
14
-You should definitely look them up in the Prelude and play with them: \url{https://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html}
14
+\ifger{Es macht Sinn diese Funktionen in \emph{Prelude}\footnote{\url{https://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html}} anzuschauen und ein bisschen damit herumzuspielen:}{You should definitely look them up in the \emph{Prelude}\footnote{\url{https://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html}} and play with them:} 
15 15
 \begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
16 16
 > foldr (-) 0 [1, 2, 3]
17 17
 > foldl (-) 0 [1, 2, 3]

+ 3
- 3
VL2/content/VL2_fold5.tex View File

@@ -1,5 +1,5 @@
1 1
 \begin{itemizep}
2
-\item if you find recurring patterns in your code, abstract them out! Experienced Haskellers avoid explicit recursion, unless the recursion pattern is so complex/specific that an abstraction doesn't make sense.
3
-\item map, filter, fold etc are all dependent on the data type (here: lists). For new data types (e.g. a tree) you can and will write your own recursion abstractions
4
-\item although these functions are so fundamental that they are already implemented for most data types out there
2
+\item \ifger{Wenn wir wiederkehrende Strukturen in unserem Code finden abstrahieren wir sie heraus! Erfahrene Haskeller vermeiden explizite Rekursion, es sei denn die Rekursionsstruktur ist sehr komplex/spezifisch, sodass Abstraktion wenig Sinn macht.}{if you find recurring patterns in your code, abstract them out! Experienced Haskellers avoid explicit recursion, unless the recursion pattern is so complex/specific that an abstraction doesn't make sense.}
3
+\item map, filter, fold etc \ifger{hängen alle vom Datentyp ab (hier: Liste)! Für neue Datentypen (z.b. einen Tree) können und werden wir unsere eigenen Rekursionsabstraktionen schreiben}{are all dependent on the data type (here: lists)! For new data types (e.g. a tree) you can and will write your own recursion abstractions}
4
+\item \ifger{diese Funktionen sind jedoch so fundamental, dass sie für die meisten Datentypen schon implementiert sind}{although these functions are so fundamental that they are already implemented for most data types out there}
5 5
 \end{itemizep}

+ 1
- 1
VL2/content/VL2_let.tex View File

@@ -1,4 +1,4 @@
1
-Another way which is very similar would be using \hinline{let}:
1
+\ifger{Ein ähnlicher Weg wäre über}{Another way which is very similar would be using} \hinline{let}:
2 2
 \begin{haskellcode}
3 3
 f :: Int -> Int
4 4
 f x = let y p = x + p

+ 4
- 6
VL2/content/VL2_let_vs_where.tex View File

@@ -1,4 +1,4 @@
1
-These look almost the same, but they are different constructs. \hinline{where} is bound to the pattern matching \hinline{f x =} and may also have access to parts of a function that are not syntactically expressions, e.g.:
1
+\ifger{Sie ähneln sich stark, aber sind unterschiedliche Konstrukte.}{These look almost the same, but they are different constructs.} \hinline{where} \ifger{ist an das pattern matching (hier \hinline{f x ...=}) der Funktion gebunden und hat auch Zugriff auf Funktionsteile, die nicht syntaktische Ausdrücke sind, z.b.:}{is bound to the pattern matching \hinline{f x ...=} and may also have access to parts of a function that are not syntactically expressions, e.g.:}
2 2
 \begin{haskellcode}
3 3
 f x
4 4
   | cond1 x   = a
@@ -7,11 +7,9 @@ f x
7 7
   where
8 8
     a = w x
9 9
 \end{haskellcode}
10
-While that is not possible with \hinline{let}, which is an actual expression and can be used whenever expressions are allowed (e.g. inside \emph{Monads}, we'll know more about these in a few weeks).
10
+\ifger{während dies mit \hinline{let} so nicht möglich ist. Dieses ist hingegen ein echter Ausdruck und kann überall dort benutzt werden, wo Ausdrücke erlaubt sind (z.b. innerhalb von \emph{Monaden}, dazu später mehr).}{While that is not possible with \hinline{let}, which is an actual expression and can be used whenever expressions are allowed (e.g. inside \emph{Monads}, we'll know more about these in a few weeks).}
11 11
 \vspace{\baselineskip}
12 12
 \\
13
-There are a few more intricacies, but most of the time this is just style consideration:\\ \url{https://wiki.haskell.org/Let_vs._Where}
13
+\ifger{Es gibt hier noch ein paar weitere Feinheiten\footnote{\url{https://wiki.haskell.org/Let_vs._Where}}, aber generell ist es einfach nur Geschmackssache.}{There are a few more intricacies\footnote{\url{https://wiki.haskell.org/Let_vs._Where}}, but most of the time this is just style consideration.}
14 14
 \pause
15
-\vspace{\baselineskip}
16
-\\
17
-How would we have to rewrite the function in order to use \hinline{let}?
15
+\ifger{Wie müssten wir die Funktion umschreiben um \hinline{let} zu benutzen?}{How would we have to rewrite the function in order to use \hinline{let}?}

+ 2
- 2
VL2/content/VL2_map1.tex View File

@@ -1,7 +1,7 @@
1
-Let's say we have a list of \hinline{Int} and want to add \hinline{2} to every element of the list.
1
+\ifger{Stellen wir uns vor wir haben eine Liste von \hinline{Int} und wollen zu jedem Element \hinline{2} addieren.}{Let's say we have a list of \hinline{Int} and want to add \hinline{2} to every element of the list.}
2 2
 \begin{haskellcode}
3 3
 addTwo :: [Int] -> [Int]
4 4
 addTwo ... ?
5 5
 \end{haskellcode}
6 6
 \pause
7
-\textbf{Exercise:} Find the answer! 5 minutes time, remember the \emph{cons} operator \hinline{(:)}, pattern matching on lists and ofc recursion! Start with the case of an empty list.
7
+\textbf{\ifger{Aufgabe:}{Exercise:}} \ifger{Lösung? 5 Minuten Zeit! Nützlich könnte sein: der \emph{cons} Operator \hinline{(:)}, pattern matching und natürlich Rekursion. Startet am besten mit dem Fall einer leeren Liste.}{Find the answer! 5 minutes time, remember the \emph{cons} operator \hinline{(:)}, pattern matching on lists and ofc recursion! Start with the case of an empty list.}

+ 4
- 4
VL2/content/VL2_map2.tex View File

@@ -1,11 +1,11 @@
1
-Solution?
1
+\ifger{Lösung:}{Solution:}
2 2
 \begin{haskellcode}
3 3
 addTwo :: [Int] -> [Int]
4 4
 addTwo [] = []
5 5
 addTwo (x:xs) = (x + 2) : addTwo xs
6 6
 \end{haskellcode}
7 7
 \pause
8
-Now we want to square every element:
8
+\ifger{Jetzt wollen wir jedes Element quadrieren:}{Now we want to square every element:}
9 9
 \pause
10 10
 \begin{haskellcode}
11 11
 square :: [Int] -> [Int]
@@ -13,11 +13,11 @@ square [] = []
13 13
 square (x:xs) = (x * x) : square xs
14 14
 \end{haskellcode}
15 15
 \pause
16
-Now we want the absolute of every element:
16
+\ifger{Jetzt wollen wir den Betrag jedes Elements:}{Now we want the absolute of every element:}
17 17
 \begin{haskellcode}
18 18
 absList :: [Int] -> [Int]
19 19
 absList [] = []
20 20
 absList (x:xs) = (abs x) : absList xs
21 21
 \end{haskellcode}
22 22
 \pause
23
-Do you notice something?
23
+\ifger{Fällt etwas auf?}{Do you notice something?}

+ 4
- 4
VL2/content/VL2_map3.tex View File

@@ -1,16 +1,16 @@
1
-All those 3 functions look almost the same. Since haskell is about abstraction, we would never really write any of those like that. Instead, we will write a function that generalizes all 3.
1
+\ifger{Alle 3 Funktionen sind sehr ähnlich. In Haskell wollen wir vor allem abstrahieren und würden niemals die Funktionen derart schreiben. Stattdessen werden wir eine Funktion schreiben, die die Rekursionsstruktur aller 3 abstrakt zusammenfässt.}{All those 3 functions look almost the same. Since haskell is about abstraction, we would never really write any of those like that. Instead, we will write a function that generalizes all 3.}
2 2
 \vspace{\baselineskip}
3 3
 \\
4 4
 \pause
5
-I'll give you the type signature, can you guess how the implementation looks like?
5
+\ifger{Ich gebe als Tipp die Typsignatur. Wie könnte die Implementierung aussehen?}{I'll give you the type signature, can you guess how the implementation looks like?}
6 6
 \begin{haskellcode}
7 7
 map :: (a -> b) -> [a] -> [b]
8 8
 \end{haskellcode}
9
-Solution?
9
+\ifger{Lösung?}{Solution?}
10 10
 \pause
11 11
 \begin{haskellcode}
12 12
 map :: (a -> b) -> [a] -> [b]
13 13
 map f []     = []
14 14
 map f (x:xs) = f x : map f xs
15 15
 \end{haskellcode}
16
-So we don't really know what the function \hinline{f} does, but we know that it converts one element of the list to something else. We \emph{map} a function over a list! Hence the name.
16
+\ifger{Wir wissen nicht was die Funktion \hinline{f} genau macht, aber wir wissen, dass sie ein Element der Liste zu etwas anderem konvertiert. Wir \emph{mappen} eine Funktion über eine Liste! Daher der Name.}{So we don't really know what the function \hinline{f} does, but we know that it converts one element of the list to something else. We \emph{map} a function over a list! Hence the name.}

+ 2
- 2
VL2/content/VL2_map4.tex View File

@@ -1,4 +1,4 @@
1
-And now watch this:
1
+\ifger{Und jetzt definieren wir unsere ursprünglichen Funktionen mithilfe von \hinline{map}:}{And now watch this:}
2 2
 \begin{haskellcode}
3 3
 addTwo :: [Int] -> [Int]
4 4
 addTwo xs = map (\x -> x + 2) xs
@@ -12,4 +12,4 @@ absList xs = map (\x -> abs x) xs
12 12
 absList = map abs
13 13
 \end{haskellcode}
14 14
 \pause
15
-Cool, right? So now we have abstracted out the \textbf{recursion pattern} that is all the same for those 3 functions. \hinline{map} is actually part of the standard library (called \emph{Prelude}).
15
+\ifger{Cool, oder? Wir haben jetzt die \textbf{Rekursionsstruktur} herausabstrahiert, weil sie für alle 3 Funktionen dieselbe ist. \hinline{map} ist schon Teil des Standardmoduls \emph{Prelude}.}{Cool, right? So now we have abstracted out the \textbf{recursion pattern} that is all the same for those 3 functions. \hinline{map} is actually part of the standard library (called \emph{Prelude}).}

+ 7
- 7
VL2/content/VL2_more_ways_to_define_functions.tex View File

@@ -1,17 +1,17 @@
1
-Now you know how a regular function looks like, e.g:
1
+\ifger{Jetzt wissen wir wie reguläre Funktionen aussehen, z.b.:}{Now you know how a regular function looks like, e.g:}
2 2
 \begin{haskellcode}
3 3
 f :: Int -> Int
4 4
 f x = x + 1
5 5
 \end{haskellcode}
6
-But now imagine we need a helper function which is very specific to the current function. In C we would have to define this new helper function at top-level and would probably make it \cinline{static}.
6
+\ifger{Aber stellen wir uns vor, dass wir einige Hilfsfunktionen benötigen, die sehr spezifisch ist und eigentlich zur aktuellen Funktion gehört. In C würden wir diese vermutlich top-level deklarieren und \cinline{static} machen.}{But now imagine we need a helper function which is very specific to the current function. In C we would have to define this new helper function at top-level and would probably make it \cinline{static}.}
7 7
 \pause
8 8
 \vspace{\baselineskip}
9 9
 \\
10
-Haskell allows us to \textbf{inline} functions in a few more ways, e.g.:
10
+\ifger{Haskell erlaubt uns hingegen Funktionen \emph{inline} zu definieren, z.b.:}{Haskell allows us to \textbf{inline} functions in a few more ways, e.g.:}
11 11
 \begin{itemizep}
12
-\item with \hinline{where}
13
-\item with \hinline{let...in}
14
-\item anonymously (lambda abstraction)
12
+\item \ifger{über}{with} \hinline{where}
13
+\item \ifger{über}{with} \hinline{let...in}
14
+\item \ifger{anonym (lambda Abstraktion}{anonymously (lambda abstraction)}
15 15
 \end{itemizep}
16 16
 \slidep
17
-A lot of Haskellers really dislike if you put non-generic functions at the top level. So you can still have atomic pieces, but inline the parts which are very specific to the current function.
17
+\ifger{Viele Haskeller mögen es nicht, wenn man nicht-generische Funktionen top-level deklariert. Denn wir können immer noch atomare Funktionsteile haben und diese aber \emph{inline} definieren, sollten sie lediglich einmal benutzte Hilfsfunktionen sein.}{A lot of Haskellers really dislike if you put non-generic functions at the top level. So you can still have atomic pieces, but inline the parts which are very specific to the current function.}

+ 4
- 4
VL2/content/VL2_polymorphism1.tex View File

@@ -1,13 +1,13 @@
1
-So when we said that haskell is good for abstraction, what did we actually mean? Do we have something like java generics or C++ templates?
1
+\ifger{Haskell eignet sich besonders gut für Abstraktion, aber wieso eigentlich? Haben wir etwas ähnliches wie java generics oder C++ templates?}{So when we said that haskell is good for abstraction, what did we actually mean? Do we have something like java generics or C++ templates?}
2 2
 \vspace{\baselineskip}
3 3
 \\
4 4
 \pause
5
-Even better! Haskell supports polymorphism for both data types and functions.\\
6
-Let's start with a polymorphic data type:
5
+\ifger{Noch besser sogar! Haskell erlaubt standardmäßig Polymorphie, ohne komplizierte APIs oder Spracherweiterungen.}{Even better! Haskell supports polymorphism for both data types and functions, out of the box without any language extensions.}\\
6
+\ifger{Wir beginnen mit einem polymorphen Datentyp:}{Let's start with a polymorphic data type:}
7 7
 \begin{haskellcode}
8 8
 data List t = Empty | Cons t (List t)
9 9
 \end{haskellcode}
10
-So we just implemented our own singly-linked List. For any type! Let's use it:
10
+\ifger{Wir haben soeben unsere eigene singly-linked Liste implementiert. Für jeden Typ! Ein paar Beispiele:}{So we just implemented our own singly-linked List. For any type! Let's use it:}
11 11
 \pause
12 12
 \begin{haskellcode}
13 13
 intList :: List Int

+ 5
- 5
VL2/content/VL2_polymorphism2.tex View File

@@ -1,20 +1,20 @@
1
-And now we are going to write functions to use it:
1
+\ifger{Und jetzt können wir sie nutzen:}{And now we are going to write functions to use it:}
2 2
 \begin{haskellcode}
3 3
 isListEmpty :: List t -> Bool
4 4
 isListEmpty Emtpy = True
5 5
 isListEmpty x     = False
6 6
 \end{haskellcode}
7 7
 \pause
8
-We can even have more generic stuff like:
8
+\ifger{Wir können sogar Funktionen schreiben wie:}{We can also have:}
9 9
 \begin{haskellcode}
10 10
 f :: a -> b
11 11
 \end{haskellcode}
12
-Whatever the function does... it gets something of one type and returns something of another type (it could be the same type, but doesn't need to). That's all we know.
12
+\ifger{D.h. was auch immer diese Funktion macht, sie bekommt etwas von einem Typ rein und gibt etwas von einem anderen Typ aus. \hinline{a} und \hinline{b} könnten vom selben Typ sein, müssen aber nicht! D.h. Funktionen dieser Art geben uns häufig mehr Freiheit. Mehr können wir über diese Funktion nicht sagen.}{So, whatever the function does... it gets something of one type and returns something of another type. \hinline{b} \emph{could} be the same type as \hinline{a} here, but it doesn't need to, so functions of this type often give us more freedom! That's all we know about this function.}
13 13
 \vspace{\baselineskip}
14 14
 \\
15 15
 \pause
16
-Similarly, remember the function \hinline{head} which gives us the first element of a list? The type signature actually looks like this:
16
+\ifger{Erinnern wir uns an die Funktion \hinline{head}. Wir können auf jeder Art von Liste mit ihr operieren. Die Typsignatur:}{Similarly, remember the function \hinline{head} which gives us the first element of a list? The type signature actually looks like this:}
17 17
 \begin{haskellcode}
18 18
 head :: [a] -> a
19 19
 \end{haskellcode}
20
-Makes sense?
20
+\ifger{Macht Sinn?}{Makes sense?}

+ 0
- 0
VL2/content/VL2_polymorphism3.tex View File


+ 8
- 8
VL2/content/VL2_questions_for_you.tex View File

@@ -1,17 +1,17 @@
1 1
 \begin{itemize}
2
-\item what is the difference between \hinline{let} and \hinline{where}?
3
-\item what is the difference between \hinline{foldr} and \hinline{foldl}?
4
-\item what is the difference between explicit and implicit recursion? Give examples
5
-\item how many arguments does a haskell function have (strictly speaking)?
6
-\item Are these type signatures technically equivalent?
2
+\item \ifger{was ist der Unterschied zwischen}{what is the difference between} \hinline{let} \ifger{und}{and} \hinline{where}?
3
+\item \ifger{was ist der Unterschied zwischen}{what is the difference between} \hinline{foldr} \ifger{und}{and} \hinline{foldl}?
4
+\item \ifger{was ist der Unterschied zwischen expliziter und impliziter Rekursion? Beispiele?}{what is the difference between explicit and implicit recursion? Give examples}
5
+\item \ifger{wie viele Argumente hat eine Haskell Funktion (streng genommen)?}{how many arguments does a haskell function have (strictly speaking)?}
6
+\item \ifger{Sind diese Typsignaturen technisch äquivalent?}{Are these type signatures technically equivalent?}
7 7
 \begin{haskellcode}
8 8
 f :: Int -> Int -> Char -> Int -> Int -> Char
9 9
 f :: Int -> Int -> (Char -> (Int -> (Int -> Char)))
10 10
 \end{haskellcode}
11 11
 % $
12
-\item what do you have to keep in mind in order to make function composition work?
13
-\item can you define \hinline{map} and \hinline{filter} in terms of \hinline{foldr}?
14
-\item simplify (and eta reduce) the following code snippet
12
+\item \ifger{worauf muss man beim verketten von Funktionen (Funktionskomposition) achten?}{what do you have to keep in mind in order to make function composition work?}
13
+\item \ifger{können wir}{can you define} \hinline{map} \ifger{und}{and} \hinline{filter} \ifger{mittels}{in terms of} \hinline{foldr}\ifger{ ausdrücken?}{?}
14
+\item \ifger{vereinfache (und eta reduce) den folgenden Code}{simplify (and eta reduce) the following code snippet}:
15 15
 \begin{haskellcode}
16 16
 f x y = (\d e -> d * e) x $ y
17 17
 \end{haskellcode}

+ 5
- 5
VL2/content/VL2_rec_patterns.tex View File

@@ -1,9 +1,9 @@
1
-Since we use lists a lot in haskell, we also want some more powerful functions to deal with them. E.g.:
1
+\ifger{Da wir in Haskell häufig Listen verwenden, wollen wir auch ein paar mächtige Funktionen kennen lernen, um mit ihnen umzugehen. Z.b.:}{Since we use lists a lot in haskell, we also want some more powerful functions to deal with them. E.g.:}
2 2
 \begin{itemize}
3
-\item perform an operation on every element on a list
4
-\item keep only some elements in the list, following some criteria
5
-\item "summarize" the elements of the list somehow
3
+\item \ifger{eine Operation auf jedem Element einer Liste ausführen}{perform an operation on every element on a list}
4
+\item \ifger{nur einige Elemente in der Liste behalten, nach einem bestimmten Kriterium}{keep only some elements in the list, following some criteria}
5
+\item \ifger{die Elemente einer Liste irgendwie ''zusammenfassen''}{''summarize'' the elements of the list somehow}
6 6
 \item ...
7 7
 \end{itemize}
8 8
 \pause
9
-How do we do that?
9
+\ifger{Wie könnte das aussehen?}{How do we do that?}

+ 4
- 4
VL2/content/VL2_reiteration.tex View File

@@ -1,6 +1,6 @@
1 1
 \begin{itemize}
2
-\item What is haskell? What are the 3 fundamental concepts behind it?
3
-\item How do you do pattern matching?
4
-\item What is the difference between lists and tuples? How do you construct them?
5
-\item How do you define your own data types?
2
+\item \ifger{Was ist Haskell? Was sind die 3 fundamentalen Konzepte hinter Haskell?}{What is haskell? What are the 3 fundamental concepts behind it?}
3
+\item \ifger{Wie funktioniert pattern matching?}{How do you do pattern matching?}
4
+\item \ifger{Was ist der Unterschied zwischen einer Liste und einem Tuple? Wie erzeugt man sie?}{What is the difference between lists and tuples? How do you construct them?}
5
+\item \ifger{Wie definieren wir unsere eigenen Datentypen?}{How do you define your own data types?}
6 6
 \end{itemize}

+ 5
- 5
VL2/content/VL2_what_you_should_know.tex View File

@@ -1,7 +1,7 @@
1 1
 \begin{itemize}
2
-\item how to write polymorphic data types and functions
3
-\item how you inline functions
4
-\item what currying is and why we need it in haskell
5
-\item how you compose functions
6
-\item how to abstract out recursion patterns
2
+\item \ifger{wie man polymorphe Funktionen und Datentypen schreibt}{how to write polymorphic data types and functions}
3
+\item \ifger{wie man \emph{inline} Funktionen schreibt}{how you inline functions}
4
+\item \ifger{was Currying ist und wieso wir es in Haskell benötigen}{what currying is and why we need it in haskell}
5
+\item \ifger{wie man Funktionen verkettet}{how you compose functions}
6
+\item \ifger{wie man Rekursionsstrukturen abstrahiert}{how to abstract out recursion patterns}
7 7
 \end{itemize}

+ 1
- 1
VL2/content/VL2_where.tex View File

@@ -1,4 +1,4 @@
1
-We use \hinline{where} to define a helper function:
1
+\ifger{Wir benutzen}{We use} \hinline{where} \ifger{um eine Hilfsfunktion zu definieren:}{to define a helper function:}
2 2
 \begin{haskellcode}
3 3
 f :: Int -> Int
4 4
 f x = x + (y 2)