Skip to content

Instantly share code, notes, and snippets.

@deanwampler
Created October 11, 2020 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deanwampler/6ca52d2cb096d64750d0d1cf2eea276c to your computer and use it in GitHub Desktop.
Save deanwampler/6ca52d2cb096d64750d0d1cf2eea276c to your computer and use it in GitHub Desktop.
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