buildIntList

inline fun buildIntList(builderAction: MutableIntList.() -> Unit): IntList(source)

Builds a new IntList by populating a MutableIntList 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 MutableIntList can be populated.


inline fun buildIntList(initialCapacity: Int, builderAction: MutableIntList.() -> Unit): IntList(source)

Builds a new IntList by populating a MutableIntList 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 MutableIntList can be populated.