docs(angular.bind): clarify that bind is partial application

The `angular.bind` function reflects the definition of "partial application", which
reduces a function's arity rather than transforming a function with n args into a
chain of n functions, each having a single arg.

curry : f(x,y,z) -> f(x)(y)(z)
partial application : f(x,y,z) -> f(x)(y,z)

Closes #4239
This commit is contained in:
Joe Hanink 2013-10-02 15:52:33 -07:00 committed by Pete Bacon Darwin
parent 7fec4bae80
commit 1691c4e9a3

View file

@ -785,7 +785,8 @@ function sliceArgs(args, startIndex) {
* @description
* Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
* `fn`). You can supply optional `args` that are prebound to the function. This feature is also
* known as [function currying](http://en.wikipedia.org/wiki/Currying).
* known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as distinguished
* from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
*
* @param {Object} self Context which `fn` should be evaluated in.
* @param {function()} fn Function to be bound.