Is there any easy way to merge two arrays in swift along with removing duplicates?
<p>Basically I need a version of <code>appendContentsOf:</code> which does not append <strong>duplicate</strong> elements.</p>

<p><strong>Example</strong></p>

<pre><code>var a = [1, 2, 3]
let b = [3, 4, 5]

a.mergeElements(b)
//gives a = [1, 2, 3, 4, 5] //order does not matter
</code></pre>