Permalink
Browse files

[docs] missing reference updated

  • Loading branch information...
1 parent 9361823 commit 794c3b9def0db8c9a58ef25b1008901b6c93b6ba @dscape committed Feb 17, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
View
@@ -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

0 comments on commit 794c3b9

Please sign in to comment.