mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-14 18:31:32 +00:00
Leaderboard Command
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
package cloud.kubelet.foundation.core
|
||||
|
||||
fun <T, R : Comparable<R>> Collection<T>.sortedBy(order: SortOrder, selector: (T) -> R?): List<T> =
|
||||
if (order == SortOrder.Ascending) {
|
||||
sortedBy(selector)
|
||||
} else {
|
||||
sortedByDescending(selector)
|
||||
}
|
Reference in New Issue
Block a user