Hint
Currying returns a function that closes over the first argument. Each call creates a fresh closure.
function multiplier(x) {
return (y) => x * y;
}
const double = multiplier(2);
const triple = multiplier(3);
console.log(double(5));
console.log(triple(double(2)));10 12
Explanation: double(5) = 2*5 = 10. double(2) = 4, then triple(4) = 3*4 = 12.
Key Insight: Currying returns a function that closes over the first argument. Each call creates a fresh closure.