News for hackers. Stuff that matters.
Re:Currying by Hirrolot on Sunday April 07, 2024 @03:58AM (#39959080)
Currying and partial application are dualities (think of them as function introduction/function elimination), so neither subsumes the other one.

However, I agree with the wording of the original comment: when you _pass_ some arguments to a constructor and then to a method, this is (at least conceptually) partial application.

Re:Currying by kerkeslager on Sunday April 07, 2024 @04:54AM (#39959379)
> Currying and partial application are dualities (think of them as function introduction/function elimination), so neither subsumes the other one.

Could you say more? I'm not sure I understand what you're saying here.

Re:Currying by skybrian on Sunday April 07, 2024 @01:45PM (#39962358)
You can think of them as equivalent ways to write the same code. There are mechanical rewrites to go from one to the other, and these rewrites work in any direction. Which way is more readable depends on circumstances.

When a function needs a lot of parameters to do a calculation, these parameters can be arbitrarily grouped into records and supplied in any order. Languages have convenient syntaxes for certain ways of grouping parameters together.

For example, a closure creates a group of parameters in the form of a function.