trait CMonoid[A] extends Monoid[A] with CSemigroup[A]
CMonoid represents a commutative monoid.
A monoid is commutative if for all x and y, x |+| y === y |+| x.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- CMonoid
- CSemigroup
- Monoid
- Semigroup
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
combine(as: TraversableOnce[A]): A
Given a sequence of
as, combine them using the monoid and return the total.Given a sequence of
as, combine them using the monoid and return the total.- Definition Classes
- Monoid
-
def
combineOption(as: TraversableOnce[A]): Option[A]
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).
- Definition Classes
- Semigroup
-
def
combinen(a: A, n: Int): A
Return
acombined with itselfntimes. -
def
combinenAboveOne(a: A, n: Int): A
- Attributes
- protected
- Definition Classes
- Semigroup
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
hashCode(): Int
- Definition Classes
- Any
-
def
isId(a: A)(implicit ev: Eq[A]): Boolean
Tests if
ais the identity.Tests if
ais the identity.- Definition Classes
- Monoid
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any