Companion

Functions

Link copied to clipboard

Builds a KoneList using the provided builderAction DSL.

inline fun <Element> KoneList.Companion.build(initialCapacity: UInt, builderAction: KoneListBuilder<Element>.() -> Unit): KoneList<Element>

Builds a KoneList with the given initialCapacity using the provided builderAction DSL.

Link copied to clipboard

Returns empty list.

Link copied to clipboard
fun <Element> KoneList.Companion.equality(elementEquality: Equality<Element> = Equality.defaultFor()): Equality<KoneList<Element>>

Returns an Equality instance for KoneList based on the given elementEquality.

Link copied to clipboard

Returns a list of provided size filled with the given element.

Link copied to clipboard
inline fun <Element> KoneList.Companion.generate(size: UInt, initializer: (index: UInt) -> Element): KoneList<Element>

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

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

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

Link copied to clipboard
fun <Element> KoneList.Companion.hashing(elementHashing: Hashing<Element> = Hashing.defaultFor()): Hashing<KoneList<Element>>

Returns a Hashing instance for KoneList based on the given elementHashing.

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

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

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

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

Link copied to clipboard

Returns an Order instance for KoneList comparing lists first by length and then lexicographically based on the given elementOrder.

Link copied to clipboard
@JvmName(name = "lexicographicOrderWithNoneAsLeast")
fun <Element> KoneList.Companion.lexicographicOrder(elementOrder: Order<Element>): Order<KoneList<Element>>

Returns an Order instance for KoneList comparing lists lexicographically based on the given elementOrder.

Link copied to clipboard

Returns an empty list.

Returns a singleton list containing the given element.

Returns a list containing the given elements.

Link copied to clipboard

Returns a Reification instance for KoneList based on the given elementReification.