lexicographicOrder

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

Lists are compared element by element. When the lists have different lengths, an element missing in one of the lists is represented as None via getMaybe, and the comparison of a present element with a missing one is determined by the given elementOrder.

Receiver

The list companion object.

Return

An Order instance for lists comparing them lexicographically.

Parameters

elementOrder

The order context for elements wrapped in Maybe used to compare corresponding elements of the lists, including cases where an element is missing in one of the lists.

Type Parameters

Element

The element type.


@JvmName(name = "lexicographicOrderWithNoneAsLeast")
fun <Element> KoneList.Companion.lexicographicOrder(elementOrder: Order<Element>): Order<KoneList<Element>>(source)

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

Lists are compared element by element. When the lists have different lengths, a missing element is considered to be less than any present element (see withNoneAsLeast).

Receiver

The list companion object.

Return

An Order instance for lists comparing them lexicographically.

Parameters

elementOrder

The order context for elements used to compare corresponding elements of the lists.

Type Parameters

Element

The element type.