Enum

split/2

split(enumerable, count)

Splits the enumerable into two enumerables, leaving count elements in the first one.

If count is a negative number, it starts counting from the back to the beginning of the enumerable.