buildLongList

inline fun buildLongList(builderAction: MutableLongList.() -> Unit): LongList(source)

Builds a new LongList by populating a MutableLongList using the given builderAction.

The instance passed as a receiver to the builderAction is valid only inside that function. Using it outside of the function produces an unspecified behavior.

Parameters

builderAction

Lambda in which the MutableLongList can be populated.


inline fun buildLongList(initialCapacity: Int, builderAction: MutableLongList.() -> Unit): LongList(source)

Builds a new LongList by populating a MutableLongList using the given builderAction.

The instance passed as a receiver to the builderAction is valid only inside that function. Using it outside of the function produces an unspecified behavior.

Parameters

initialCapacity

Hint for the expected number of elements added in the builderAction.

builderAction

Lambda in which the MutableLongList can be populated.