Skip to content

Instantly share code, notes, and snippets.

@creationix
Created February 4, 2010 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save creationix/294257 to your computer and use it in GitHub Desktop.
Save creationix/294257 to your computer and use it in GitHub Desktop.
// Imagine some library called Do that is used as follows:
Do.parallel(
users.search({"age >": 21}).addCallback,
file.read("pubs.txt").addCallback
)(function (people, text) {
// This function will be called after the database
// query and the file read are both done.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment