Last active
October 11, 2020 20:00
-
-
Save deanwampler/b277550a3a7f9a1e52192a9120a38153 to your computer and use it in GitHub Desktop.
Compares Scala 2 vs. Scala 3 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
// 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