Enum

dedup/1

dedup(enumerable)

Discards all those adjacent duplicated elements in the enumerable, collapsing them in a single element.