How to take the first n elements of an array in Kotlin?

How to take the first n elements of an array in Kotlin?