```inline fun <T, reified R> Array<T>....
# stdlib
h
Copy code
inline fun <T, reified R> Array<T>.mapToArray(transform: (T) -> R) = 
    Array(size) { transform(get(it)) }
etc for
List
, primitive arrays...
m
The downside is that you need
reified R
which is not always available in generic library code. Alternative: https://github.com/Miha-x64/Kotlin-MPP_Collection_utils/blob/master/src/commonMain/kotlin/net/aquadc/collections/arr.kt#L107
h
cool, thanks