Skip to content

Instantly share code, notes, and snippets.

@kinnerapriyap
Last active December 9, 2019 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinnerapriyap/9d1721d0dfb6df194879f55d0dd9523a to your computer and use it in GitHub Desktop.
Save kinnerapriyap/9d1721d0dfb6df194879f55d0dd9523a to your computer and use it in GitHub Desktop.
private const val RETIREMENT_AGE = 60
data class Person(
val name: String,
val address: String,
val age: Int,
val isActive: Boolean
) {
fun isPersonRetired() =
!isActive || age > RETIREMENT_AGE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment