📅  最后修改于: 2022-03-11 15:01:36.393000             🧑  作者: 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