ELI5: Explain Like I'm 5

Partial application

Partial application is like building with Legos. Imagine you have a big box with lots of different Lego pieces in it. You want to build a cool spaceship, but you don't have all the pieces you need. Instead of giving up or waiting to get all the pieces, you can start building with the pieces you have. You might not be able to finish the spaceship yet, but you can make some progress, and maybe even have a cool little car or robot in the meantime.

In programming, functions are like sets of Legos. They take in input (like the pieces you have) and return output (like the thing you built). Sometimes, you might have a function that takes in multiple inputs, but you only have some of them. Just like with Legos, you can still make use of what you've got.

Partial application is the process of taking a function and some of its input, and creating a new function that only needs the remaining input to complete the original function. This new function is like a partially built Lego creation—it's not complete, but it's still useful.

For example, imagine you have a function that takes in two numbers and returns their sum. You can partially apply this function by giving it one number, creating a new function that only needs one more number to complete the original function. This new function might be called something like "addThree" because you're always adding three to the input you provide.

Using this new function, you could add three to any number without typing out the whole sum every time. This saves time and makes your code simpler to read and write. And just like with Legos, you can keep adding on to this partially applied function until it becomes the perfect spaceship (or whatever else you're trying to build).
Related topics others have asked about: