Skip to content

Instantly share code, notes, and snippets.

Last active Dec 24, 2020
What would you like to do?
fun doSomething(user: User) {
- val birthDate = user.birthDate()
- val age = calculateAgeByBirthDate(birthDate)
+ val age = user.let { calculateAgeByBirthDate(it.birthDate()) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment