What I did get from the article is something that works a lot like promises:
- async functions return type of "eventual" data (in your case, a function you pass a callback to)
- various other functions that can operate on that eventual data type to return more eventual data
What does this style offer that standard promises doesn't?
The magic phrase you were looking for is "partial application." (Partial functions are a different, even more esoteric thing.) Basically, partially applying a function means you create a new function that calls the original with some of the arguments already filled in. For example, you could write this:
var getUserList = partiallyApply(jQuery.getJSON, 'http://example.com/user-list');
is there any (technical or political) reason, why this is or will not be part of underscorejs?
- comp: http://github.com/azer/comp
- andthen: http://github.com/azer/andthen
- join-params: http://github.com/azer/join-params
- map: http://github.com/azer/map.js
- new-partial: http://github.com/azer/new-partial