kotlin.comparisons.thenBy

thenBy

inline fun <T> Comparator<T>.thenBy(
    crossinline selector: (T) -> Comparable<*>?
): Comparator<T>

Platform and version requirements: JS

Creates a comparator comparing values after the primary comparator defined them equal. It uses the function to transform value to a Comparable instance for comparison.

inline fun <T, K> Comparator<T>.thenBy(
    comparator: Comparator<in K>, 
    crossinline selector: (T) -> K
): C