title: How are node Promises getting in between `nextTick` and `setImmediate`?
body: <p>I had a weird timing bug in my app that came from switching from Bluebird to native promises.  I fixed it, but am left with this oddity: Native promises seem to wiggle their way in between <code>nextTick</code> and <code>setImmediate</code> -- how?  And is this supposed to happen?  Where are promises <em>supposed</em> to go with regard to these?</p>
  
  <pre><code>~function(){
    setTimeout            (console.log.bind(console, 'timeout A'));
    process.nextTick      (console.log.bind(console, 'nextTick A'));
    setImmediate          (console.log.bind(console, 'setImmediate A'));
    Promise.resolve().then(console.log.bind(console, 'promise'));
    process.nextTick      (console.log.bind(console, 'nextTick B'));
    setImmediate          (console.log.bind(console, 'setImmediate B'));
    setTimeout            (console.log.bind(console, 'timeout B'));
  }();
  </code></pre>
  
  <p>Native yields:</p>
  
  <pre><code>nextTick A
  nextTick B
  promise undefined
  setImmediate A
  setImmediate B
  timeout A
  timeout B
  </code></pre>
  
  <p>Bluebird yields:</p>
  
  <pre><code>nextTick A
  nextTick B
  setImmediate A
  promise undefined
  setImmediate B
  timeout A
  timeout B
  </code></pre>