ULongArray

Creates a new array of the specified size, where each element is calculated by calling the specified init function.

@ExperimentalUnsignedTypesinline fun ULongArray(size: Int, init: (Int) -> ULong): ULongArray(source)
@OptIn(ExperimentalUnsignedTypes::class)
fun main() {
    val uArray = ULongArray(5) { i -> (i.toULong() * i.toULong()) }
    println(uArray.joinToString(", "))
}

Source