If this case is common in your code, you can defin...
# getting-started
u
If this case is common in your code, you can define extension function like:
Copy code
fun <T> List<T>.sub(from: Int = 0, to: Int = size) = subList(from, to)
It still clear, but you can call it with one argument:
Copy code
list.sub(from = 1)
list.sub(to = 5)