Zahara Vidumshikova
07/27/2021, 7:03 AMfun<T : Comparable<T>, K> comparePairByFirst() : Comparator<Pair<T, K>> = Comparator { p1, p2 -> p1.first.compareTo(p2.first) }
I have this code and it works, but creates a new similar comparator every use. I think it is bad. How can I make it better?
------------------------------------------------------------------------------------------------------------------------------------------------------------
How i can "this" method in inline functions? I want to get that class to log it.Eugen Martynov
07/27/2021, 8:55 AMEugen Martynov
07/27/2021, 8:55 AMZahara Vidumshikova
07/27/2021, 9:53 AMZahara Vidumshikova
07/27/2021, 3:20 PM