Skip to content

Instantly share code, notes, and snippets.

@macalinao
Created May 20, 2017 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macalinao/f072b1b2a34400e47fedc2872e7c00e4 to your computer and use it in GitHub Desktop.
Save macalinao/f072b1b2a34400e47fedc2872e7c00e4 to your computer and use it in GitHub Desktop.
package pw.ian.playground.cats
import cats._
import cats.implicits._
// runMain "pw.ian.playground.shapeless.KittensNullMonoid"
object NullTypeclass {
case class Moments(ct: Int)
implicit val momentsMonoid: Monoid[Moments] = Monoid[Moments]
def main(args: Array[String]): Unit = {
println(momentsMonoid) // prints "null"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment