There isn’t anything like that in stdlib AFAIK. A ...
# stdlib
k
There isn’t anything like that in stdlib AFAIK. A simple extension like this (end inclusive) should suffice though
Copy code
infix fun Int.through(end: Int): IntProgression {
    return if (end > this) this..end else this downTo end
}

fun main(args: Array<String>) {
    (0 through 5).forEach(::println)
    (4 through -3).forEach(::println)
}
g
Also would be nice to have goesTo and goesUntil
1