RosettaCodeData/Task/Remove-duplicate-elements/Nemerle/remove-duplicate-elements.n...

13 lines
225 B
Plaintext

using System.Linq;
using System.Console;
module RemDups
{
Main() : void
{
def nums = [1, 4, 6, 3, 6, 2, 7, 2, 5, 2, 6, 8];
def unique = $[n | n in nums.Distinct()];
WriteLine(unique);
}
}