Placed parameters of pipe on one line for better readability

This commit is contained in:
Justin Lee
2017-12-14 14:53:20 -08:00
parent 89cb11bccc
commit 0925f657da

View File

@ -8,10 +8,7 @@ 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 multiply = (x, y) => x * y
const multiplyAndAdd5 = pipe( const multiplyAndAdd5 = pipe(multiply, add5)
multiply,
add5
)
multiplyAndAdd5(5, 2) -> 15 multiplyAndAdd5(5, 2) -> 15
*/ */