Created
March 2, 2020 17:18
-
-
Save levinotik/0b4baa3171be9d4416f5cff277ccd4fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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