Skip to content

Instantly share code, notes, and snippets.

@kinnerapriyap
Last active December 9, 2019 06:13
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/37597da7273fb00865622d0a67000c9b to your computer and use it in GitHub Desktop.
Save kinnerapriyap/37597da7273fb00865622d0a67000c9b to your computer and use it in GitHub Desktop.
data class Person(
val name: String,
val address: String,
val age: Int,
val isActive: Boolean,
val hasPersonWorked: Boolean
) {
fun isPersonRetired() =
hasPersonWorked && (!isActive || age > 60)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment