toSlice

fun IntRange.toSlice(): Slice
fun ClosedRange<Int>.toSlice(): Slice

Returns Slice containing the first, the last with a step of 1.