Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compose javascript

//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
 
PREVIOUS NEXT
Tagged: #compose #javascript
ADD COMMENT
Topic
Name
9+7 =