Scoop API

scoop:scoop.std:0.1.0

sortedBy

function sortedBy

source · line 35
public
public fun <T, K : Compare<K>> Sequence<T>.sortedBy(selector: (T) -> K): Sequence<T>

Extension receiver: Sequence<T>

Evaluation is deferred until iteration. Creates a lazy sequence that materializes a stable copy ordered by the selector's natural key order. Each traversal materializes the complete input before yielding results.