Monoid

trait Monoid[A] extends Semigroup[A] {
  def mempty: A
  def mappend(a1: A, a2: A): A
  def sconcat(a1: A, a2: A): A =
    mappend(a1, a2)
}

object Monoid {
  implicit class MonoidOps[A: Monoid](a1: A) {
    def <#>(a2: A): A =
      implicitly[Monoid[A]].mappend(a1, a2)
  }
}