Typically, in Scala type class libraries, monoid is represented as follows: trait OMonoid[A] { def mzero(): A def mappend(a1: A, a2: A): A } This type class is what is known as the object algebra interface, an interface of an abstract factory to create expressions.