Removes the duplicates from a sequence.
// 1, 2, 4, 3
Enumerable.create(1, 2, 4, 2, 3)
.distinct();
// 1, 2, 4, '2', 3, 5
Enumerable.create(1, 2, 4, '2', 3, 4, 5)
.distinct('x, y => x === y');
Removes the duplicates from a sequence.
// 1, 2, 4, 3
Enumerable.create(1, 2, 4, 2, 3)
.distinct();
// 1, 2, 4, '2', 3, 5
Enumerable.create(1, 2, 4, '2', 3, 4, 5)
.distinct('x, y => x === y');