Created
January 15, 2015 15:38
-
-
Save lehnerpat/fd599d66d02f3384e2b0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import scalaz._ | |
object Main { | |
implicit def setMonoid[A] = new Monoid[Set[A]] { | |
def append(f1: Set[A], f2: => Set[A]) = f1 union f2 | |
def zero = Set[A]() | |
} | |
def main(args: Array[String]) { | |
Set(1) |+| Set(2) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment