Two cousins in functional programming that look similar, but serve different purposes.

Introduction
If you’ve been around JavaScript long enough, you’ve seen both partial application and currying tossed around in blogs, libraries (like Lodash, Ramda), and interviews. Developers often confuse them because both involve breaking down arguments and reusing functions.
But here’s the deal: partial application and currying are not the same. They solve related problems but in different ways.
This guide clears it up with plain-English definitions, code examples, side-by-side comparisons, and real-world use cases you can actually apply at work.
1) The Core Difference (in One Sentence)
- Currying: Transforming a function with multiple arguments into a series of unary (one-argument) functions.
- Partial Application: Fixing (“pre-filling”) some arguments of a function, returning a function that takes the rest.
👉 Currying always produces one-argument functions. Partial application can produce functions that still accept multiple arguments.
2) Currying Explained
Take a function with multiple arguments:
function add(a, b, c) {
return a + b + c;
}
Curried version
const curryAdd = a => b => c => a + b + c;
curryAdd(1)(2)(3); // 6
- Each function takes exactly one argument.
- To get the final result, you must call the chain.
- This form enables easy composition (functions that take one arg can be chained and piped).
3) Partial Application Explained
Same starting function:
function add(a, b, c) {
return a + b + c;
}
Partial application
const add1 = add.bind(null, 1); // fix the first argument
console.log(add1(2, 3)); // 6
const add1and2 = add.bind(null, 1, 2);
console.log(add1and2(3)); // 6
- You “lock in” some arguments.
- The returned function can accept multiple arguments at once.
- Doesn’t force everything into unary functions.
4) Side-by-Side Code Comparison
Currying
const curriedMultiply = a => b => c => a * b * c;
curriedMultiply(2)(3)(4); // 24
Partial Application
function multiply(a, b, c) {
return a * b * c;
}
const double = multiply.bind(null, 2);
double(3, 4); // 24
Key difference: Currying reshapes the function. Partial application reuses it with fixed args.
5) Visual Mental Model
Currying:
f(a, b, c) → f(a)(b)(c)
Partial Application:
f(a, b, c)
→ fix a → g(b, c)
→ fix a, b → h(c)
👉 Currying is structural transformation.
👉 Partial application is argument pre-filling.
6) Real-World Use Cases
6.1 Currying in Functional Pipelines
const greaterThan = a => b => b > a;
const gt10 = greaterThan(10);
console.log([5, 15, 20].filter(gt10)); // [15, 20]
Here, currying makes reusable predicates for filter
, map
, etc.
6.2 Partial Application for Configuration
function fetchWithBase(baseUrl, endpoint, params) {
return fetch(`${baseUrl}/${endpoint}?${new URLSearchParams(params)}`)
.then(r => r.json());
}
const api = fetchWithBase.bind(null, "https://api.example.com");
api("users", { limit: 10 });
api("posts", { page: 2 });
Here, partial application pre-fills the base URL.
6.3 React Example
Currying for Higher-Order Components
const withClass = className => Component => props =>
<div className={className}><Component {...props} /></div>;
const RedBox = withClass("red")(props => <span>{props.text}</span>);
Partial Application for Event Handlers
function handleAction(type, msg, e) {
console.log(type, msg, e.target.value);
}
const handleSave = handleAction.bind(null, "SAVE", "Saving data...");
// usage in JSX
<input onChange={handleSave} />
7) Generic Curry Utility in JS
function curry(fn) {
return function curried(...args) {
if (args.length >= fn.length) {
return fn.apply(this, args);
} else {
return function(...next) {
return curried.apply(this, args.concat(next));
};
}
};
}
const sum = (a, b, c) => a + b + c;
const curriedSum = curry(sum);
curriedSum(1)(2)(3); // 6
curriedSum(1, 2)(3); // 6
👉 Allows flexible currying — still preserves unary chaining.
8) Common Pitfalls
- Confusing the two: Currying restructures; partial application reuses.
- Over-currying: Don’t curry everything — only when chaining/specialization helps.
- Context loss (
this
): Curried functions ignorethis
. Partial application withbind
locks in boththis
and args.
9) Quick Reference Table

Conclusion
Currying and partial application look similar, but they serve different purposes:
- Currying is about reshaping functions to fit into functional composition pipelines.
- Partial application is about fixing arguments to reuse functions in different contexts.
Pro tip: If your goal is composition → think currying. If your goal is reuse with defaults → think partial application.
Call to Action
Have you ever mistakenly used partial application when you actually needed currying — or vice versa?
💬 Share your war story in the comments.
🔖 Bookmark this as your quick-reference.
👩💻 Share with a teammate who still thinks currying = partial application.
Leave a Reply