DEV Community

Discussion on: What is Currying?

Collapse
 
gefjon profile image
Phoebe Goldman

I'm unclear on the Lisp snippet you give in the paragraph starting "If you are familiar with other languages..." It looks based on context ("Java's f(a, b, c)") like you're trying to show calling the function f with the arguments a, b and c, which would traditionally look like

(f a b c)

Your existing Lisp snippet, (((f a) b) c) is how one would call a curried function of 3 arguments in Lisp, which translates to Java as f(a)(b)(c) (I think. Does Java even do anonymous functions? That's how it would look in C++, Javascript, etc., at least).