Re:But – A way to pass along a callback with just a single a...
by dyscrete on Monday December 29, 2014 @03:34PM
(#8811633)
Why not allow an optional 2nd argument that defaults to 1 on your `but` library to do this?
[ Parent
| on HN ]
Re:But – A way to pass along a callback with just a single a...
by aaronem on Monday December 29, 2014 @03:58PM
(#8811731)
Why complicate things? If it means so much to you, you can just
var butt = require('butt');
var but = function(fun) {
return butt(fun, 1);
};
or even var but = function(fun) {
return function(arg) {
return fun(arg);
};
};