DEV Community

Discussion on: The concept of Triple CCC: Currying, Closure, Callback in JavaScript

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

A much nicer way to write your curried sum function:

const sum = x => y => z => x+y+z
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rahulbanerjee99 profile image
Rahul Banerjee

oh I didn't know this, thanks for sharing!