Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created July 4, 2018 21:10
Scala Cats Monoid
import cats.Monoid
import cats.instances.int._
import cats.instances.option._
val a = Option(22)
val b = Option(20)
val r = Monoid[Option[Int]].combine(a, b)
println(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment