Remove duplicate elements: Difference between revisions

Add Ecstasy example
(Add Ecstasy example)
Line 2,144:
1,2,3,4
</pre>
 
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">module RetainUniqueValues
{
@Inject Console console;
void run()
{
Int[] array = [1, 2, 3, 2, 1, 2, 3, 4, 5, 3, 2, 1];
array = array.distinct().toArray();
console.println($"result={array}");
}
}</syntaxhighlight>
 
=={{header|Elixir}}==
162

edits