-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
This is generated code from CoffeeScript that runs in node 0.4.5 and with latest asyncjs. I use the "=>" operator, that prefixes a function's body and preserves the current context (this):
var async;
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
async = require('asyncjs');
async.list([1, 2, 3]).forEach(__bind(function(name, next) {
return next(null, name);
}, this)).toArray(false, function(e, f) {
return console.log(f);
});
Result:
[ 1, 2, 3 ]
[ 1, 2, 3, 3 ]
[ 1, 2, 3, 3, 2 ]
[ 1, 2, 3, 3, 2, 1 ]
Instead of:
[ 1, 2, 3 ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels