Skip to content

Instantly share code, notes, and snippets.

@lehnerpat
Created January 15, 2015 15:38
Show Gist options
  • Save lehnerpat/fd599d66d02f3384e2b0 to your computer and use it in GitHub Desktop.
Save lehnerpat/fd599d66d02f3384e2b0 to your computer and use it in GitHub Desktop.
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