Placed parameters of pipe on one line for better readability
This commit is contained in:
@ -8,10 +8,7 @@ const pipe = (...fns) => fns.reduce((f, g) => (...args) => g(f(...args)))
|
||||
const add5 = x => x + 5
|
||||
const multiply = (x, y) => x * y
|
||||
|
||||
const multiplyAndAdd5 = pipe(
|
||||
multiply,
|
||||
add5
|
||||
)
|
||||
const multiplyAndAdd5 = pipe(multiply, add5)
|
||||
|
||||
multiplyAndAdd5(5, 2) -> 15
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user