Exemplo de Currying em Prototype
Exemplo de Currying em Prototype
JavaScript
function showArguments() {
alert($A(arguments).join(', '));
}
showArguments(1, 2, 3);
// alerta "1, 2, 3"
var f = showArguments.curry(1, 2, 3);
f('a', 'b');
// alerta "1, 2, 3, a, b"