Jump to content

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
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.printlnprint($"result={array}");
}
}</syntaxhighlight>
</syntaxhighlight>
 
{{out}}
<pre>
result=[1, 2, 3, 4, 5]
</pre>
 
=={{header|Elixir}}==
162

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.