Есть ли "хороший" способ устранения последовательных дубликатов элементов списка?
Пример:
["red"; "red"; "blue"; "green"; "green"; "red"; "red"; "yellow"; "white"; "white"; "red"; "white"; "white"]
должен стать
["red"; "blue"; "green"; "red"; "yellow"; "white"; "red"; "white"]
- "nice" я имею в виду наиболее читаемый и понятный для нового пользователя и быстрое выполнение:)