removed unnecessary brackets around one parameter function
This commit is contained in:
@ -5,7 +5,7 @@ Use `Array.reduce()` to perform left-to-right function composition. The first (l
|
||||
```js
|
||||
const pipe = (...fns) => fns.reduce((f, g) => (...args) => g(f(...args)))
|
||||
/*
|
||||
const add5 = (x) => x + 5
|
||||
const add5 = x => x + 5
|
||||
const multiply = (x, y) => x * y
|
||||
|
||||
const multiplyAndAdd5 = pipe(
|
||||
|
||||
Reference in New Issue
Block a user