Dmitry Kandalov and I try the refactoring from Chapter 9 of Java to Kotlin, A Refactoring Guidebook (https://java-to-kotlin.dev/).
When a function can be defined as a single expression, Kotlin allows us to dispense with the braces and return statement. Apart from making everything a little more compact, I've found that aiming for single-expression functions can improve my code.
If you liked this, you should probably subscribe to Dmitry's channel / dkandalov
Watch video Kotlin Multi to Single Expression Functions online without registration, duration hours minute second in high quality. This video was added by user Pairing with Duncan 12 March 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 219 once and liked it 12 people.