Curriculum Series

What is the difference between currying and partial application?

What is the difference between currying and partial application?

What is the difference between currying and partial application?

JavaScript

The short answer

Currying transforms a function into a chain of single-argument functions: f(a, b, c) becomes f(a)(b)(c). Partial application fixes some arguments upfront and returns a function for the rest: f(a, b, c) becomes g(c) where a and b are already set. Currying always produces unary functions, partial application can fix any number of arguments.

Side by side

javascript
function add(a, b, c) {
return a + b + c;
}
// Currying — one argument at a time
const curried = (a) => (b) => (c) => a + b + c;
curried(1)(2)(3); // 6
// Partial application — fix some arguments upfront
const partial = add.bind(null, 1, 2);
partial(3); // 6

The key differences

CurryingPartial ApplicationArgumentsAlways one at a timeFix any number at onceResultChain of unary functionsOne function with fewer argumentsFlexibilityMust call step by stepPre-fill whatever you want

When to use which

Currying works well when you want to create a pipeline of transformations or when a library expects single-argument functions:

javascript
const add = (a) => (b) => a + b;
[1, 2, 3].map(add(10)); // [11, 12, 13]

Partial application works well when you want to create specialized versions of a function:

javascript
const log = (level, message) =>
console.log(`[${level}] ${message}`);
const logError = log.bind(null, 'ERROR');
const logInfo = log.bind(null, 'INFO');
logError('Something broke'); // [ERROR] Something broke
logInfo('App started'); // [INFO] App started

In practice

In everyday JavaScript, partial application (often through bind or closures) is more common than currying. Currying is more common in functional programming libraries.

Interview Tip

Show both side by side with the same function. The key distinction is: currying always takes one argument per call, partial application takes any number. This is a quick comparison question — do not over-explain.

Why interviewers ask this

Many candidates confuse the two terms. Interviewers ask this to see if you understand the precise difference. It also tests your understanding of closures and higher-order functions.

Finished reading?

Mark this topic as solved to track your progress.