Created
January 25, 2021 15:10
-
-
Save deanwampler/e4734550c1ae5acb758eb190608bbf78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
scala> trait Logger: | |
| def log(message: String): Unit | |
scala> val info = new Logger: | |
| def log(message: String): Unit = println(s"INFO: $message") | |
val info: Logger = anon$1@16f19cc9 | |
scala> info.log("Hello world!") | |
INFO: Hello world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment