generate

inline fun <Element> KoneList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneList<Element>(source)

Returns a list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


inline fun <Element> KoneList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneList<Element>(source)

Returns a list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.


inline fun <Element> KoneNoddedList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneNoddedList<Element>(source)

Returns a nodded list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


inline fun <Element> KoneNoddedList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneNoddedList<Element>(source)

Returns a nodded list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.


inline fun <Element> KoneSettableList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneSettableList<Element>(source)

Returns a settable list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


inline fun <Element> KoneSettableList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneSettableList<Element>(source)

Returns a settable list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.


Returns a settable nodded list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


Returns a settable nodded list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.


inline fun <Element> KoneMutableList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneMutableList<Element>(source)

Returns a mutable list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


inline fun <Element> KoneMutableList.Companion.generate(indices: UIntRange, initializer: (index: UInt) -> Element): KoneMutableList<Element>(source)

Returns a mutable list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.


Returns a mutable nodded list of provided size of elements produced by the initializer.

The element with index index (from 0 to size exclusive) is initializer(index). All initializer invocations are computed consecutively on values from 0 to size exclusive in their order starting with 0.


Returns a mutable nodded list of elements over the provided indices range produced by the initializer.

The element with index index (from indices range) is initializer(index). All initializer invocations are computed consecutively on values in the range in their order starting with the first.