const addOne = x => x+1
const addTwo = x => x+2
addTwo(addOne(5)) //8
const pipe = (fn1,fn2) => x => fn2(fn1(x))
pipe(addOne,addTwo) //x => fn2(fn1(x))
pipe(addOne,addTwo)(5) //8
const mergeFn = pipe(addOne,addTwo)
mergeFn(5) //8
2024-01-21 15:29:52
const addOne = x => x+1
const addTwo = x => x+2
addTwo(addOne(5)) //8
const pipe = (fn1,fn2) => x => fn2(fn1(x))
pipe(addOne,addTwo) //x => fn2(fn1(x))
pipe(addOne,addTwo)(5) //8
const mergeFn = pipe(addOne,addTwo)
mergeFn(5) //8