Browse Source

Add negative example

Julian Ospald 4 years ago
parent
commit
717c1b370f
No account linked to committer's email address
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      VL2/content/VL2_currying5.tex

+ 3
- 0
VL2/content/VL2_currying5.tex View File

@@ -12,5 +12,8 @@ Did you just notice the braces? They are \textbf{very} important! So, currying i
12 12
 \begin{haskellcode}
13 13
 f :: Int -> Int -> Int
14 14
 f :: Int -> (Int -> Int)
15
+
16
+-- but this is NOT the same
17
+f :: (Int -> Int) -> Int
15 18
 \end{haskellcode}
16 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?