@@ -178,18 +178,40 @@ In the example, Foo is a tagged union type which has two constructors. It's firs
179Functions in PureScript can have zero or more arguments in general, just like in Javascript.
179Functions in PureScript can have zero or more arguments in general, just like in Javascript.
181−Functions are introduced by using a backslash followed by a comma separated list of argument names:
181+Functions are introduced by using a backslash followed by a list of argument names:
183```haskell
183```haskell
184−test1 = \a, b, c -> a + b + c
184+test1 = \a b -> a + b
187−which would correspond to the Javascript `function test1(a, b, c) { return a + b + c; }`
187+which would correspond to the Javascript
191+ return function (b) {
197+Multiple argument functions can be introduced by wrapping the arguments in parentheses, and separating them with commas:
200+test1 = \(a, b) -> a + b
206+function test1(a, b) {
189A function taking no arguments would look like this:
211A function taking no arguments would look like this:
191```haskell
213```haskell
192−test2 = \ -> 100
214+test2 = \() -> 100
195which would correspond to the Javascript `function test2() { return 100; }`
217which would correspond to the Javascript `function test2() { return 100; }`
@@ -205,7 +227,7 @@ A special case is made in the case of functions with one argument. These functio
206```haskell
228```haskell
207-- has type Number -> Number -> Number -> Number
229-- has type Number -> Number -> Number -> Number
208−addThree = \a -> \b -> \c -> a + b + c
230+addThree = \a b c -> a + b + c
210-- has type Number -> Number -> Number
232-- has type Number -> Number -> Number
211addThree 1
233addThree 1
@@ -304,7 +326,7 @@ The following types of statement are supported:
304Here is an example of a power function defined using a block:
326Here is an example of a power function defined using a block:
306```haskell
328```haskell
307−pow = \n, p -> do
329+pow = \n p -> do
308 var m = n
330 var m = n
309 for i <- 0 until p:
331 for i <- 0 until p:
310 m = m * n
332 m = m * n
@@ -560,7 +582,7 @@ In addition to the standard operators, user-defined infix operators can be creat
560E.g. to create a synonym for string concatenation:
582E.g. to create a synonym for string concatenation:
562```haskell
584```haskell
563−(<>) = \s1 -> \s2 -> s1 ++ s2
585+(<>) = \s1 s2 -> s1 ++ s2
565greeting = "Hello" <> "World!"
587greeting = "Hello" <> "World!"
@@ -568,7 +590,7 @@ greeting = "Hello" <> "World!"
568Regular functions can be used as operators by enclosing their names in backticks:
590Regular functions can be used as operators by enclosing their names in backticks:
570```haskell
592```haskell
571−foo = \x -> \y -> x * y + y
593+foo = \x y -> x * y + y
573test = 10 `foo` 20
595test = 10 `foo` 20