Tell us what’s happening:
Describe your issue in detail here.
I’m having trouble understanding partial applications and how is it beneficial in functional programming. Can someone explain with reference to the code below?
Your code so far
function impartial(x, y, z) {
return x + y + z;
}
var partialFn = impartial.bind(this, 1, 2);
partialFn(10); // 13
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Challenge: Introduction to Currying and Partial Application
this is how I do understand it:
partial application helps for example if you have a code library where it gives you some function with some strict parameters, and you need to use it in another way, for example fulfiling its parameters step by step.