Factory
object Factory
Functions
Link copied to clipboard
fun <T : Comparable<T>> Sequence<T>.assertSorted(sortOrder: SortOrder = ASCENDING): SortedSequence<T, T>
Creates a SortedSequence from this sequence, asserting that elements are sorted according to their natural order.
Link copied to clipboard
fun <TKey : Comparable<TKey>, TValue> Sequence<TValue>.assertSortedBy(sortOrder: SortOrder = ASCENDING, keySelector: (TValue) -> TKey): SortedSequence<TKey, TValue>
Creates a SortedSequence from this sequence, asserting that elements are sorted by the given key selector.