Top "Currying" questions

Currying is the process of transforming a function of multiple arguments into a function of one argument that returns another function, which takes one fewer argument than the original one.

What is 'Currying'?

I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at …

functional-programming terminology definition currying
How do I write a function that returns another function?

In Python, I'd like to write a function make_cylinder_volume(r) which returns another function. That returned function should …

python function functional-programming currying
How can I make var a = add(2)(3); //5 work?

I want to make this syntax possible: var a = add(2)(3); //5 based on what I read at http://dmitry.baranovskiy.com/…

javascript currying
What is the difference between currying and partial application?

I quite often see on the Internet various complaints that other peoples examples of currying are not currying, but are …

language-agnostic terminology definition currying partial-application
Variadic curried sum function

I need a js sum function to work like this: sum(1)(2) = 3 sum(1)(2)(3) = 6 sum(1)(2)(3)(4) = 10 etc. I heard it can't be done. …

javascript currying
JavaScript curry: what are the practical applications?

I don’t think I’ve grokked currying yet. I understand what it does, and how to do it. I …

javascript function currying partial-application
Does Java support Currying?

I was wondering if there is any way to pull that in Java. I think it is not possible without …

java functional-programming currying partial-application
Two ways of defining functions in Scala. What is the difference?

Here is a little Scala session that defines and tries out some functions: scala> def test1(str: String) = str + …

function scala currying
Scala currying vs partially applied functions

I realize that there are several questions on here about what currying and partially applied functions are, but I'm asking …

scala functional-programming currying
Why does Scala provide both multiple parameters lists and multiple parameters per list?

Multiple parameters lists, e.g. def foo(a:Int)(b:Int) = {} and multiple parameters per list, e.g. def foo(…

scala currying partial-application