Created
October 11, 2020 20:10
-
-
Save deanwampler/6ca52d2cb096d64750d0d1cf2eea276c to your computer and use it in GitHub Desktop.
Compares Scala 2 vs. Scala 3 methods optional braces
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
def m2(s: String): String = { | |
val result = s.toUpperCase | |
println(s"output: $result") | |
result | |
} | |
def m3(s: String): String = | |
val result = s.toUpperCase | |
println(s"output: $result") | |
result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment