Improve currying slides further

This commit is contained in:
Julian Ospald 2015-05-02 13:59:58 +02:00
父節點 686f4fc438
當前提交 a8f9458649
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 220CD1C5BDEED020
共有 2 個檔案被更改,包括 8 行新增4 行删除

查看文件

@ -6,5 +6,11 @@ f x y z = x + y + z
-- ...for this
f = \x -> (\y -> (\z -> x + y + z)) -- right-associative
\end{haskellcode}
\ifger{Frage: was passiert, wenn wir nur $x = 3$ übergeben?}{Question: what happens if we just pass $x = 3$?}
\ifger{Frage: was passiert, wenn wir nur $x = 3$ übergeben?}{Question: what happens if we just pass $x = 3$?}
\vspace{\baselineskip}
\\
\pause
\ifger{Wieso nicht das?}{Why not this?}
\begin{haskellcode}
f = \x -> x + (\y -> y + (\z -> z)) -- no!
\end{haskellcode}

查看文件

@ -8,8 +8,6 @@ addInt = \x -> (\y -> x + y)
addTwo :: Int -> Int
addTwo = addInt 2
-- equivalent to
addTwo = \y -> addInt 2 y
\end{haskellcode}
\ifger{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.
\vspace{\baselineskip}\\