MCPcopy Index your code
hub / github.com/mouredev/hello-javascript / currySum

Function currySum

Intermediate/00-advanced-functions.js:120–128  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

118// Currying
119
120function currySum(a) {
121 return function (b) {
122 return function (c) {
123 return function (d) {
124 return sum(a, b, c, d)
125 }
126 }
127 }
128}
129
130const sumAB = currySum(1)(2)
131const sumC = sumAB(3)

Callers 1

Calls 1

sumFunction · 0.70

Tested by

no test coverage detected