unique([1, 2, 2, 3, 3, 3]) // β [1, 2, 3]
unique(['a', 'a', 'b']) // β ['a', 'b']unique<T> removes duplicates by passing the array through a Set, preserving insertion order.
Challenge: Implement unique<T>(arr: T[]): T[] returning only the distinct values, preserving order.
unique([1, 2, 2, 3, 3]) // β [1, 2, 3]
unique(['a', 'b', 'a']) // β ['a', 'b']