Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Last active December 24, 2020 11:13
Embed
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