Skip to content

Commit

Permalink
[docs] missing reference updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dscape committed Feb 17, 2012
1 parent 9361823 commit 794c3b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -5,6 +5,12 @@
``` js
var insertAll = require('p');

// pretending we are doing an async call
function insertElement(data, callback) {
var timeout = Math.ceil(Math.random() * 3000);
setTimeout(function() { callback(null, data); }, timeout);
};

insertAll([], Function, function (cb) { cb(); });
insertAll(function (l,cb) {
var elem = l.shift(); // head
Expand Down

0 comments on commit 794c3b9

Please sign in to comment.