How currying and partial application differ in Clojure, why `partial` is the common tool, and when Java developers should use each idea.
Currying and partial application are related ideas, but they are not the same thing. Java developers often hear both terms early in functional programming and treat them as interchangeable. In Clojure, that leads to unnecessary confusion because one idea is common and practical, while the other is mostly conceptual unless you build it yourself.
In everyday Clojure, you will use partial application far more often than true currying.
A curried function does not take all its arguments at once. It returns another function after receiving the first argument.
1(defn curried-add [x]
2 (fn [y]
3 (+ x y)))
4
5((curried-add 5) 10)
6;; => 15
That is real currying shape: first argument now, second argument later, each step returning another function.
Partial application starts with a normal multi-argument function and pre-fills some of its arguments.
1(defn add-tax [rate amount]
2 (* amount (+ 1 rate)))
3
4(def add-hst (partial add-tax 0.13))
5
6(add-hst 100)
7;; => 112.99999999999999
Here the original function is still a normal two-argument function. partial just gives you a derived function with one argument already fixed.
For Java developers, this is often the more useful everyday pattern because it helps create domain-specific helpers from general functions.
partialClojure functions naturally support multiple arities, and most library code is written with normal argument lists, not curried chains. That means partial fits the language better most of the time.
Common examples:
map1(defn format-price [currency amount]
2 (str currency " " amount))
3
4(def format-usd (partial format-price "USD"))
5
6(map format-usd [10 25 90])
7;; => ("USD 10" "USD 25" "USD 90")
That is usually clearer and more idiomatic than rewriting the original function into curried form.
If you do not separate the two ideas, you can misread code and design APIs awkwardly.
A curried API says:
A partially applied function says:
Those are different shapes, and recognizing the difference makes code easier to reason about.
In Java, both concepts often feel heavier because you usually express them with lambdas, nested Function types, or helper methods.
In Clojure:
So the syntax overhead drops, and the real design question becomes: “Am I modeling a staged function call, or am I just pre-filling arguments?”
That question matters more than the terminology.
Currying is useful when staged function creation is the point of the design. For example, you may want one call to lock in one decision and return a specialized function for later use.
But if your only goal is “I already know one argument,” partial application is usually the simpler answer.
If you used partial, you performed partial application, not currying.
Sometimes a small anonymous function is clearer than introducing a curried abstraction no one needs.
partial is most useful when the arguments you want to pre-fill come first. If a function’s argument order fights this, that can be a signal to rethink the API.
Ask two questions:
If it is the second case, partial is probably the right tool.