3 ms·
By extracting repetitive bits of code and reducing them to a simple function call. The website examples aren't very inspiring indeed. Have a look at some of th
by jillesvangurp 3y ago
By extracting repetitive bits of code and reducing them to a simple function call.
The website examples aren't very inspiring indeed. Have a look at some of the extension functions for the Collections interface:
https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Collections.kt#L253C38-L253C51 https://github.com/JetBrains/kotlin/blob/master/libraries/st...