induce

inline fun <Element> KoneList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneList<Element>(source)

Returns a list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneList<Element>(source)

Returns a list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.


inline fun <Element> KoneNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneNoddedList<Element>(source)

Returns a nodded list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneNoddedList<Element>(source)

Returns a nodded list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.


inline fun <Element> KoneSettableList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableList<Element>(source)

Returns a settable list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneSettableList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableList<Element>(source)

Returns a settable list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.


inline fun <Element> KoneSettableNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableNoddedList<Element>(source)

Returns a settable nodded list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneSettableNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneSettableNoddedList<Element>(source)

Returns a settable nodded list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.


inline fun <Element> KoneMutableList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableList<Element>(source)

Returns a mutable list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneMutableList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableList<Element>(source)

Returns a mutable list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.


inline fun <Element> KoneMutableNoddedList.Companion.induce(size: UInt, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableNoddedList<Element>(source)

Returns a mutable nodded list of provided size where each next element is computed from the previous one.

The first element is initialElement. For each next index i from 1 to size exclusive, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices starting with 1.


inline fun <Element> KoneMutableNoddedList.Companion.induce(indices: UIntRange, initialElement: Element, inducer: (index: UInt, previous: Element) -> Element): KoneMutableNoddedList<Element>(source)

Returns a mutable nodded list of elements over the provided indices range where each next element is computed from the previous one.

The first element is initialElement. For each next index i in the indices range after the first, the element is inducer(i, previousElement). All inducer invocations are computed consecutively in the order of indices.