How to remove duplicate elements inside an array - swift 3 : <p>I want to remove duplicate elements from an array. there are many answers in stack overflow but for swift 3. </p>

<p>my array:</p>

<pre><code>var images = [InputSource]()
... // append to array
</code></pre>

<p>how to remove duplicate elements from this array?</p>

<p>Is there any native api from swift 3 ?</p>
