inline fun <T> buildListWithSize(size: Int, block (index: Int, size: Int) -> T): List<T> = List(size){ block(it, size)}
2 Likes
inline fun <T> buildListWithSize(size: Int, block (index: Int, size: Int) -> T): List<T> = List(size){ block(it, size)}