News for hackers. Stuff that matters.
Re:Easy node.js programming by abss on Tuesday January 28, 2014 @03:36AM (#7136048)
var harvest = require("harvests").create();

    harvest.let('father', loadPenguin, 'MrPenguin');
    harvest.let('mother', loadPenguin, 'MrsPenguin');
    harvest.let('family', loadPenguinFamily, wait('father'), wait('mother'));

    harvest.do(function(family){
        console.log(family); //also in  harvest.father, harvest.mother, harvest.family you got values
    }, wait('family') );

    harvest.onFail(function(error, variable, index){
        console.log("Well, move those penguins to the South Pole...", error, variable, index);
    });

There are no comments on this comment yet.