mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-10 20:46:51 +00:00
add an example of impurity
This commit is contained in:
parent
f2e95693ca
commit
26ee327775
1 changed files with 11 additions and 0 deletions
11
readme.md
11
readme.md
|
|
@ -86,6 +86,17 @@ greet.toUpperCase(); // YO;
|
||||||
|
|
||||||
greet // yo;
|
greet // yo;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
As opposed to:
|
||||||
|
|
||||||
|
```js
|
||||||
|
let numbers = [1, 2, 3];
|
||||||
|
|
||||||
|
numbers.splice(0); // [1, 2, 3]
|
||||||
|
|
||||||
|
numbers // []
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Side effects
|
## Side effects
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue