Skip to content

Instantly share code, notes, and snippets.

@levinotik
Created March 2, 2020 17:18
Show Gist options
  • Save levinotik/0b4baa3171be9d4416f5cff277ccd4fb to your computer and use it in GitHub Desktop.
Save levinotik/0b4baa3171be9d4416f5cff277ccd4fb to your computer and use it in GitHub Desktop.
class Counter(val count: Int = 0) {
def inc = new Counter(count + 1)
def dec = new Counter(count - 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment