This commit is contained in:
Hemanth.HM 2015-04-03 03:57:05 +00:00
parent 5a836308db
commit e5fd793982

View file

@ -64,7 +64,16 @@ curriedSum(40)(2) // 42.
---
## Purity
> A function is said to be pure if the return value is only determined by its
input values, without any side effects.
```js
let greet = "yo";
greet.toUpperCase(); // YO;
greet // yo;
```
---
## Side effects
@ -77,7 +86,7 @@ executions with the the same input parameters.
`f(f(x)) = f(x)`
`Math.abs(Math.abs(10))`
`Math.abs(Math.abs(10))`
---