does this already exist in the stdlib somewhere? i...
# announcements
h
does this already exist in the stdlib somewhere? if not, would you want it to?
Copy code
fun <T: Any> Array<T>.mapInRange(range: IntRange, transform: (Int) -> T) {
    for (i in range) {
        this[i] = transform(i)
    }
}