title: Passing along ellipsis arguments to two different functions?
body: <p>How do I write a main function flexible enough to pass extra arguments along to multiple functions?  Simple attempts have failed:</p>
  
  <pre><code>&gt; mainF &lt;- function(f1,f2,...) {
  +     f2( X=f1(...), ... )
  + }
  &gt; mainF(function(x) x, function(X, y) X*y, x=5, y=3)
  Error in f2(X = f1(...), ...) : unused argument (x = 5)
  </code></pre>
  
  <p>I can see how this might be possible by examining formals and matching call arguments in the ellipsis to the formals of each function.  Is there a better way, though?</p>