Removes duplicates from a list, so that only distinct items remain in the list.
List<T>
The input list.
The output list, which consists of the distinct items of the input list only.
The output list is a set in the mathematical sense, which can have distinct objects only.