From 717c1b370ff3bdb969bdfd0a365ba350294b5bf0 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 21 Apr 2015 00:24:24 +0200 Subject: [PATCH] Add negative example --- VL2/content/VL2_currying5.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VL2/content/VL2_currying5.tex b/VL2/content/VL2_currying5.tex index 0e6a0c4..5e4d926 100644 --- a/VL2/content/VL2_currying5.tex +++ b/VL2/content/VL2_currying5.tex @@ -12,5 +12,8 @@ Did you just notice the braces? They are \textbf{very} important! So, currying i \begin{haskellcode} f :: Int -> Int -> Int f :: Int -> (Int -> Int) + +-- but this is NOT the same +f :: (Int -> Int) -> Int \end{haskellcode} 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? \ No newline at end of file