title: Applying multiple tuples to the same function (i.e. `apply(f, tuples...)`) without recursion or `tuple_cat`
body: <p><a href="http://en.cppreference.com/w/cpp/experimental/apply"><code>std::experimental::apply</code></a> has the following signature:</p>
  
  <pre><code>template &lt;class F, class Tuple&gt;
  constexpr decltype(auto) apply(F&amp;&amp; f, Tuple&amp;&amp; t);
  </code></pre>
  
  <p>It basically invokes <code>f</code> by expanding <code>t</code>'s elements as the arguments.</p>
  
  <hr>
  
  <p>I would like something that does the exact same thing, but with multiple tuples at the same time:</p>
  
  <pre><code>template &lt;class F, class... Tuples&gt;
  constexpr decltype(auto) multi_apply(F&amp;&amp; f, Tuples&amp;&amp;... ts);
  </code></pre>
  
  <p>Example usage:</p>
  
  <pre><code>std::tuple t0{1, 2, 3};
  std::tuple t1{4, 5, 6};
  auto sum = [](auto... xs){ return (0 + ... + xs); };
  
  assert(multi_apply(sum, t0, t1) == 1 + 2 + 3 + 4 + 5 + 6);
  </code></pre>
  
  <hr>
  
  <p>I can think of various naive way of implementing <code>multi_apply</code>:</p>
  
  <ul>
  <li><p>Use <a href="http://en.cppreference.com/w/cpp/utility/tuple/tuple_cat"><code>std::tuple_cat</code></a> and then calling <code>std::experimental::apply</code>.</p></li>
  <li><p>Use recursion to bind every tuple's arguments to a series of lambdas that eventually call the original function.</p></li>
  </ul>
  
  <p>But what I'm asking is: <strong>how can I implement <code>multi_apply</code> without resorting to <code>std::tuple_cat</code> or recursion?</strong></p>
  
  <p>What I ideally would like to do is: generate an <a href="http://en.cppreference.com/w/cpp/utility/integer_sequence"><code>std::index_sequence</code></a> for every tuple and match every tuple with its own index sequence <strong>in the same variadic expansion</strong>. Is this possible? Example:</p>
  
  <pre><code>// pseudocode-ish
  template &lt;class F, std::size_t... Idxs, class... Tuples&gt;
  constexpr decltype(auto) multi_apply_helper(
      F&amp;&amp; f, std::index_sequence&lt;Idxs&gt;... seqs,  Tuples&amp;&amp;... ts)
  {
      return f(std::get&lt;Idxs&gt;(ts)...);
  } 
  </code></pre>