What is partial application?
By FrontendPro Editorial Team Updated 9/26/2026
Answer
Partial application means fixing some of a function's arguments now and getting back a new function that waits for the rest. It turns a general function into a more specific one without rewriting it.
function request(method, url, body) {
return fetch(url, { method, body });
}
const post = request.bind(null, "POST");
post("/api/users", JSON.stringify({ name: "Mai" }));
bind is the built-in way; a closure does the same thing and reads more clearly when you want control over argument order:
const partial = (fn, ...fixed) => (...rest) => fn(...fixed, ...rest);
const add = (a, b, c) => a + b + c;
const add10 = partial(add, 10);
add10(5, 2); // 17
Not the same as currying
The two get confused constantly. Currying converts f(a, b, c) into a chain f(a)(b)(c) where every call takes exactly one argument. Partial application fixes any number of arguments in one go and returns a function taking however many remain:
curried(1)(2)(3); // currying — one at a time, always
partial(fn, 1, 2)(3); // partial application — two now, rest later
Where it is useful
- Configuring a generic helper once:
const logError = log.bind(null, "ERROR"). - Pre-binding a dependency so callers do not have to pass it every time:
const findUser = query.bind(null, db). - Building small, readable pipelines in functional code.
Two practical notes: the fixed arguments always come first, so design parameter order with the most stable values leftmost. And remember every bind produces a new function identity — cache it if you plan to remove it as an event listener later.
