KaseyaRole: Senior Software Development EngineerSeptember 2026
Interview question
Implement sum so that sum(1)(2)(3)() returns the sum of its arguments. It must support an arbitrary number of chained single-argument calls, such as four, five or six calls, with a final empty invocation returning the result.