@vikingmew Well using the it-style lambda won't work, you have to compare two objects so you'll need to parameters. You can either write the comparison yourself or you can see if you can find something here:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.comparisons/
Edit: something like this should work:
val comparator = reverseOrder(compareBy(it.a, it.b))