title: In Objective-C/C, can you write a function that combines 2 blocks?
body: <p>I often find myself creating a "wrapper" block which just serves to execute a number of other blocks, usually with the same type signature.</p>
  
  <p>Say I have 2 blocks with the same type signature:</p>
  
  <pre><code>MyBlockT block1 = ^(NSString *string, id object) {
      //1 does some work
  };
  
  MyBlockT block2 = ^(NSString *string, id object) {
      //2 does some other work
  };
  </code></pre>
  
  <p>Is there some way to implement the magic function <code>Combine()</code> which would take 2 blocks:</p>
  
  <pre><code>MyBlockT combinedBlock = Combine(block1, block2); //hypothetical function
  </code></pre>
  
  <p>and be equivalent to doing:</p>
  
  <pre><code>MyBlockT combinedBlock = ^(NSString *string, id object) {
      block1(string, object);
      block2(string, object);
  };
  </code></pre>
  
  <p>I know this only makes sense with blocks that return <code>void</code>, but that's all I'm interested in.</p>
  
  <p>The <code>Combine</code> function needs only take in 2 blocks, if I have more I can just chain them. I'm at wits end on how to go about implementing this or whether it's even possible.</p>
  
  <p>P.S. I wouldn't mind if the solution involved C macros</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'd like to be able to use the resulting block as a method argument, e.g.:</p>
  
  <pre><code>[UIView animateWithDuration:1 animations:someCombinedBlock];
  </code></pre>