Overview
Excerpt |
---|
Create a new function based on an existing function but with some parameters pre-defined. |
...
For more info on currying, see Wikipedia.
Availability
Util.js v0.5 and above.
Syntax
Code Block |
---|
var fNew = fExisting.uCurry(cArgs);
fNew(args); |
Where fExisting is any existing function.
Parameters
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
A good example is shown in Object.uAddProperty() example using a curried allianceExistsBetween() function.
See also
...