Skip to content

Instantly share code, notes, and snippets.

@cjpartridgeb
Created September 10, 2012 04:28
Show Gist options
  • Save cjpartridgeb/3688880 to your computer and use it in GitHub Desktop.
Save cjpartridgeb/3688880 to your computer and use it in GitHub Desktop.
Simple curry example
// assuming http.get fires back err, result
function curryGet = function(url) {
return function(callback) {
http.get(url, callback);
}
}
async.parallel([
curryGet('www.google.com'),
curryGet('www.nodejs.org'),
],
function(err, results){});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment