mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 02:26:43 +00:00
missing semicolon
This commit is contained in:
parent
d8277e87ad
commit
28aa73f0c6
1 changed files with 2 additions and 2 deletions
|
|
@ -415,7 +415,7 @@ object.map(compose(f, g)) ≍ object.map(g).map(f)
|
||||||
A common functor in JavaScript is `Array` since it abides to the two functor rules:
|
A common functor in JavaScript is `Array` since it abides to the two functor rules:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
[1, 2, 3].map(x => x) // = [1, 2, 3]
|
;[1, 2, 3].map(x => x) // = [1, 2, 3]
|
||||||
```
|
```
|
||||||
|
|
||||||
and
|
and
|
||||||
|
|
@ -496,7 +496,7 @@ An anonymous function that can be treated like a value.
|
||||||
Lambdas are often passed as arguments to Higher-Order functions.
|
Lambdas are often passed as arguments to Higher-Order functions.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
[1, 2].map((a) => a + 1) // [2, 3]
|
;[1, 2].map((a) => a + 1) // [2, 3]
|
||||||
```
|
```
|
||||||
|
|
||||||
You can assign a lambda to a variable.
|
You can assign a lambda to a variable.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue