DEV Community

Discussion on: Introduction to Currying in JavaScript

fischgeek profile image

Curious, why are you so concerned with "context switches"? A function should only have knowledge of what it has been given.

Being able to pipe functions together is where the power (and fun) comes in! Have a look at F# For Fun and Profit for a reference on thinking functionally.

Also, see what they say specifically about currying.

I know these are referring to a different language, but the baisc principals remain. Hope this helps you! I'll try to come up with some "real-world" examples time permitting. Cheers.