We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feb0711 commit d91fd76Copy full SHA for d91fd76
2629. function-composition/index.js
@@ -0,0 +1,10 @@
1
+const compose = (functions) => {
2
+ return (x) => {
3
+ let temp = x
4
+ for(let i = functions.length - 1; i >= 0; i--){
5
+ temp = functions[i](temp)
6
+ }
7
+ return temp
8
+
9
10
+}
0 commit comments