12 Days of Posts: Day 2 – Partial application of a function
This day’s post is a continuation of the last post. In the last post we covered that a function can return a function, but we did not cover any use cases. This post will discuss a very useful one.
We have an add function:
function add(x, y){ return x + y; } We can partially apply one of the parameters and return a new function. To reinforce what this means we will look at an example.