|
- \ifger{D.h. mathematisch gesehen können wir schreiben:}{So in mathematical terms you can say:}\\
- $f : A_1 \times ... \times A_n \mapsto B$
- \vspace{\baselineskip}
- \\
- \ifger{wird zu}{gets modified into:}\\
- \pause
- $f' : A_1 \mapsto (A_2 \mapsto (\ ...\ (A_n \mapsto B)))$
- \vspace{\baselineskip}
- \\
- \pause
- \ifger{Die Klammern hier sind äußerst wichtig! Currying ist \emph{rechts}-assoziativ, d.h. die folgenden 2 Typsignaturen sind äquivalent:}{The braces are \textbf{very} important! It means currying is \emph{right}-associative and these these two signatures are equivalent:}
- \begin{haskellcode}
- f :: Int -> Int -> Int
- f :: Int -> (Int -> Int)
-
- -- but this is NOT the same
- f :: (Int -> Int) -> Int
- \end{haskellcode}
- \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}.
|