📅  最后修改于: 2022-03-11 15:04:00.294000             🧑  作者: Mango
//It is also called as nested function in ecmascript
const compose =(f,g) => (a) => f(g(a));
const sum = (num) => num + 1;
compose(sum,sum)(5)
//Answer is 7