Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compares Scala 2 vs. Scala 3 methods optional braces
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
You can’t perform that action at this time.