|
|
|
|
|
by chc
4820 days ago
|
|
> You need to explain more - for example what do you mean by a "partial"? A quick search for "partial functions" gave me several links to mathematics articles. 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');
and getUserList would then be a function that takes a callback and calls jQuery.getJSON('http://example.com/user-list', yourCallback)
|
|