splitAt
trait Collection[A] {
def splitAt(i: Int): (Collection[A], Collection[A])
}
splitAt
creates a Tuple2
with two collections: the first containing all the elements whose index is less than i
and the other with the rest of elements.