Return the identity element for this monoid.
Given a sequence of as, combine them using the monoid and return the total.
Given a sequence of as, combine them using the semigroup and return the total.
Given a sequence of as, combine them using the semigroup and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
Return a combined with itself n times.
Tests if a is the identity.
A monoid is a semigroup with an identity. A monoid is a specialization of a semigroup, so its operation must be associative. Additionally,
op(x, id) == op(id, x) == x. For example, if we haveMonoid[String], withopas string concatenation, thenid = "".