title: Promise: how to pass function with parameters?
body: <p>In the following test code, I try to pass predefined function with parameters (i.e., t2, t3) to then. But it complains "r" not defined.</p>
  
  <pre><code>var Promise = require('bluebird');
  
  var t2 = function(r) {
      console.log("2r: " + r);
      return 2 * r;
  };
  
  var t3 = function(r) {
      console.log("3r: " + r);
      return 3 * r;
  };
  
  new Promise(function(resolve, reject) {
  
      setTimeout(function() {
          resolve(1);
          reject(2)
      }, 1000);
  })
  .then(t2(r), t3(r))
  .then(t2(r), t3(r))
  .then(t2(r), t3(r));
  </code></pre>