Q26: What is Function Currying?

Currying is a technique of transforming a function with multiple arguments into a sequence of functions that each take a single argument (f(a, b, c) into f(a)(b)(c)).

Key Takeaways
  • Transforms multi-argument functions into unary function chains.
  • Enables partial application and higher-order functional composition.
Knowledge Check

How would you call a curried function add(a)(b) to calculate 2 + 3?