Skip to content

Instantly share code, notes, and snippets.

@arisolt
Created January 20, 2013 09:39
Show Gist options
  • Save arisolt/4577527 to your computer and use it in GitHub Desktop.
Save arisolt/4577527 to your computer and use it in GitHub Desktop.
var async = require('async')
var final_array = [];
function a(param) {
console.log("a");
return function() {
param * 10;
};
};
function b() {
function c(callback){
var arr = [];
for (var i = 1; i <= 3; i++) {
arr.push(a(i));
};
callback(null, arr);
};
function d(arr, callback){
console.log(arr[1]());
callback();
};
async.waterfall([c, d]);
};
b();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment