Merge branch 'master' into master

This commit is contained in:
Angelos Chalaris
2017-12-16 13:49:06 +02:00
committed by GitHub
10 changed files with 53 additions and 13 deletions

View File

@ -1,6 +1,6 @@
### Compose functions
Use `Array.reduce()` with the spread operator (`...`) to perform right-to-;eft function composition.
Use `Array.reduce()` to perform right-to-left function composition.
The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.
```js
@ -11,4 +11,4 @@ const multiply = (x, y) => x * y
const multiplyAndAdd5 = compose(add5, multiply)
multiplyAndAdd5(5, 2) -> 15
*/
```
```