Skip to content

Commit 0c9e051

Browse files
committed
starting function composition task
1 parent 734d243 commit 0c9e051

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

easy/function-composition.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @param {Function[]} functions
3+
* @return {Function}
4+
*/
5+
var compose = function (functions) {
6+
return function (x) {};
7+
};
8+
9+
/**
10+
* const fn = compose([x => x + 1, x => 2 * x])
11+
* fn(4) // 9
12+
*/

0 commit comments

Comments
 (0)