Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.