mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 02:26:43 +00:00
Change semicolon position to match other examples
Similar cases in documentation start with ";[", as code style suggests
This commit is contained in:
parent
e29c4700b8
commit
d3b3a6ffa0
1 changed files with 4 additions and 4 deletions
|
|
@ -423,9 +423,9 @@ john.age + five === ({name: 'John', age: 30}).age + (5)
|
||||||
A [curried](#currying) function that ignores its second argument:
|
A [curried](#currying) function that ignores its second argument:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const constant = a => () => a;
|
const constant = a => () => a
|
||||||
|
|
||||||
[1, 2].map(constant(0)) // => [0, 0]
|
;[1, 2].map(constant(0)) // => [0, 0]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Constant Functor
|
### Constant Functor
|
||||||
|
|
@ -1043,9 +1043,9 @@ A **function** `f :: A => B` is an expression - often called arrow or lambda exp
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// times2 :: Number -> Number
|
// times2 :: Number -> Number
|
||||||
const times2 = n => n * 2;
|
const times2 = n => n * 2
|
||||||
|
|
||||||
[1, 2, 3].map(times2) // [2, 4, 6]
|
;[1, 2, 3].map(times2) // [2, 4, 6]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Partial function
|
## Partial function
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue