Skip to content

Instantly share code, notes, and snippets.

@deanwampler
Last active October 11, 2020 20:00
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/b277550a3a7f9a1e52192a9120a38153 to your computer and use it in GitHub Desktop.
Save deanwampler/b277550a3a7f9a1e52192a9120a38153 to your computer and use it in GitHub Desktop.
Compares Scala 2 vs. Scala 3 optional braces
// With braces
trait Monoid2[A] {
def add(a1: A, a2: A): A
def zero: A
}
// Without braces
trait Monoid3[A]:
def add(a1: A, a2: A): A
def zero: A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment