LongArray

constructor(size: Int)(source)

Creates an array with size elements, each initially zero.

Parameters

size

the number of elements.

Throws


constructor(size: Int, init: (Int) -> Long)(source)

Creates an array by invoking init once for each index in ascending order.

For size zero, init is not called. If a callback throws, the exception propagates and no array is returned; effects of completed callback calls are retained.

Parameters

size

the number of elements.

init

computes the element at the given zero-based index.

Throws