Remove duplicate elements: Difference between revisions
Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag
(Add Ecstasy example) |
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag) |
||
Line 2,146:
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module RetainUniqueValues
{
@Inject Console console;
Line 2,153 ⟶ 2,154:
Int[] array = [1, 2, 3, 2, 1, 2, 3, 4, 5, 3, 2, 1];
array = array.distinct().toArray();
console.
}
}
</syntaxhighlight>
{{out}}
<pre>
result=[1, 2, 3, 4, 5]
</pre>
=={{header|Elixir}}==
|