Let’s say that an API I’m using requires a callback function that takes two parameters, apple and banana.
An example in CoffeeScript:
example = (apple, banana) -> [...]
The function I want to use as the callback function takes only banana for its parameter:
myFunction = (banana) -> [...]
So I create a new function in order to use myFunction as the callback:
callback = (apple, banana) -> myFunction banana
Is there a proper term for this kind of function?
When working with databases one uses the term “projection” for selecting and reordering list values (as parameters are). This is also typical in relational algebra (see here), so I would apply the term here, too.