title: Unite types under one protocol
body: <p>What is the best way to unite to unrelated types under one protocol, e.g. to use that new type as an element type for an array?</p>
  
  <p><em>e.g.</em>: 
  Third-party-provided class <code>Foo</code> and class <code>Bar</code> are unrelated, however, I would like to create an array which contains elements of types  <code>Foo</code> <em>and</em> <code>Bar</code>. Note that I can't change the implementation of <code>Foo</code> and <code>Bar</code> directly.</p>
  
  <p>One approach might be:</p>
  
  <pre><code>protocol FooBar {}
  extension Foo: FooBar {}
  extension Bar: FooBar {}
  </code></pre>
  
  <p>However, this strikes me as odd and rather unappealing, since there are no implementations – are there other ways?</p>
  
  <p>I will enumerate through that array and process the Elements knowing that it can be either <code>Foo</code> or <code>Bar</code> inside.</p>