Enum

chunk_by/2

chunk_by(enumerable, fun)

Splits enumerable on every element for which fun returns a new value.