Skip to content

Instantly share code, notes, and snippets.

@satoshun
Created April 10, 2018 08:10
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 satoshun/a83a3008c4c0f4e9b7ddbc60315a2f74 to your computer and use it in GitHub Desktop.
Save satoshun/a83a3008c4c0f4e9b7ddbc60315a2f74 to your computer and use it in GitHub Desktop.
data class User(private val loginCount: Int, private val firstAccess: Boolean) {
  private fun isHeavyUser() : Boolean() {
 // hyper HeavyUser if loginCount > 100. hyper HeavyUser doesn’t contain a HeavyUser.
  return firstAccess || (loginCount >= 10 && loginCount <= 100)
 }
private fun hyperHeavyUser(): Boolean() { /** */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment