``` fun <G> List<G>.sorted(alg: SortAl...
# announcements
o
Copy code
fun <G> List<G>.sorted(alg: SortAlg = QSort): List<G> = alg.makeSort(this)
interface SortAlg {
    fun <T> makeSort(list: List<T>) : List<T>
}
object QSort : SortAlg {
    override fun <T> makeSort(list: List<T>): List<T> = TODO()
}
This would be correct, same number of characters to type, and works in Kotlin today.