I receive a list, which may contain (multiple times) two or more identical elements consecutively. Something like
["a", "b", "c", "b", "b", "c", "b", "d", "d"]
After processing there should be no identical elements one after another anymore:
["a", "b", "c", "b", "c", "b", "d"]
What would be Elixir experts’ suggestion on how to process such lists a) efficiently and b) preferably in an Elixir-idiomatic way?