DEV Community

Discussion on: Currying in JS 🤠

lukaszahradnik profile image
Lukáš Zahradník • Edited on

Currying is a function that takes several parameters as input and returns a function with exactly one parameter.

Currying is a fundamental tool in functional programming, a programming pattern that tries to minimize the number of changes to a program’s state (known as side effects) by using immutable data and pure (no side effects) functions.

Currying isn't a function and isn't about minimizing side effects

rolandcsibrei profile image
Roland Csibrei


wakeupmh profile image
Marcos Henrique Author

Yeah, it's a technique, but why this isn't about minimizing side effects?

lukaszahradnik profile image
Lukáš Zahradník

Currying isn't about the content of function (where side effects happen), but about translating evaluation into a sequence.