Well that specific example could also be done like...
# getting-started
r
Well that specific example could also be done like this:
Copy code
fun <T> List<T>.headAndTail() = this.first() to this.takeLast(size - 1)