All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cats.syntax.monoid.scala Maven / Gradle / Ivy

The newest version!
package cats
package syntax

trait MonoidSyntax extends SemigroupSyntax {
  // TODO: use simulacrum instances eventually
  implicit final def catsSyntaxMonoid[A: Monoid](a: A): MonoidOps[A] =
    new MonoidOps[A](a)
}

final class MonoidOps[A](private val lhs: A) extends AnyVal {
  def isEmpty(implicit A: Monoid[A], eq: Eq[A]): Boolean = A.isEmpty(lhs)(eq)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy