> For the complete documentation index, see [llms.txt](https://edsonha.gitbook.io/my-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edsonha.gitbook.io/my-gitbook/object-oriented-programming-oop/functional-programming-fp/partial-application.md).

# Partial Application

It is a way for us to partially apply a function. Well, it means taking a function applying some of its arguments into the function, so it remembers those parameters and then it uses closures to later on be called with all the rest of the arguments.

```javascript
const multiply = (a, b, c) => a * b * c;

const partialMultiplyBy5 = multiply.bind(null, 5);
partialMultiplyBy5(10, 2); // 100
partialMultiplyBy5(10); // NaN because the thrid params is undefined

const partialMultiplyBy50 = multiply.bind(null, 5, 10);
partialMultiplyBy50(2); // 100
partialMultiplyBy50(2, 10); //100 as the fourth params is ignored

```

That's the main difference between currying and partial application. Partial application expect all parameter on the second call. VS currying which expect one argument at one time.
