title: Can you pass parameters to a function without invoking it right away?
body: <p>I need to feed a <code>pipe()</code> handler function a bunch of function names so it can execute them in order, waiting for completion of each as it goes. This is great when those functions don't need parameters passing, but when parameters <em>are</em> needed I can't figure out how to pass them without the function going ahead and invoking itself (caused by the brackets).</p>
  
  <p>For example, this is what I typically pass:</p>
  
  <p><code>pipeHandler([function1, function2]);</code></p>
  
  <p>It'll then invoke <code>function1()</code> and <code>function2()</code> before the promise is completed.</p>
  
  <p>Where it gets difficult is when I want to do something like thiss:</p>
  
  <p><code>pipeHandler([function1('value'), function2]);</code></p>
  
  <p>That causes function1() to invoke immediately, completely bypassing the promise mechanism.</p>
  
  <p>In case it helps, this is the handler function:</p>
  
  <pre><code>function pipeHandler(requiredFunctions) {
      //Execute first required function
      var executeFunctions = requiredFunctions[0]();
  
      //Execute each subsequent required function using pipe()
      for ( var index = 1; index &lt; requiredFunctions.length; index++ ) {
          executeFunctions = executeFunctions.pipe(requiredFunctions[index]);
      }
  
      //Execute allDone() using pipe()
      executeFunctions = executeFunctions.pipe(allDone);
  }
  </code></pre>
  
  <p>Hope somebody has an idea!</p>