title: How can I do pagination with Bluebird Promises?
body: <p>I have something like</p>
  
  <pre><code>new Promise (resolve, reject) -&gt;
    trader.getTrades limit, skip, (err, trades) -&gt;
      return reject err if err
  
      resolve trades
  .each (trade) -&gt;
    doStuff trade
  </code></pre>
  
  <p><code>limit</code> is set to some arbitrary number, say <code>10</code> and <code>skip</code> starts at <code>0</code>. I want to keep increasing <code>skip</code> until there are no more <code>trades</code>.</p>
  
  <p>The <code>doStuff</code> is a function I'm using to process each trade.</p>
  
  <p>This works the first time, but I want to get more trades in a paginated fashion. Specifically, I want to run <code>trader.getTrades</code> with a higher <code>skip</code> until <code>trades.length</code> is 0</p>