DEV Community


Discussion on: ✔||🤢 Commit or Vomit | function currying 🍛

avaq profile image
Aldwin Vlasblom • Edited

Applying the style mentioned above, your snippet would look like:

const multiply = a => b => c => a * b * c
console.log (multiply (1) (2) (3)) // 6
Enter fullscreen mode Exit fullscreen mode

It's a minor change, but for many that breathing room makes all the difference, especially in larger bodies of code.