Skip to content

Instantly share code, notes, and snippets.

@kriszyp
Created September 1, 2010 22:10
Show Gist options
  • Save kriszyp/561464 to your computer and use it in GitHub Desktop.
Save kriszyp/561464 to your computer and use it in GitHub Desktop.
node>when = require("promised-io/promise").when;
[Function]
node>defer = require("promised-io/promise").defer;
[Function]
node>d = defer();
node>when(when(d.promise,function(){},function(){return 5}),function(){print("su
ccess");});
{ then: [Function] }
node>d.reject("error");
success
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment