AdditiveCommutativeSemigroup

trait AdditiveCommutativeSemigroup[@specialized(Int, Long, Float, Double) A] extends AdditiveSemigroup[A]
Companion
object
trait Serializable
class Any
trait Rng[A]
trait BoolRng[A]
class SetBoolRng[A]
trait BoolRing[A]
trait Field[A]
trait Ring[A]
trait Semiring[A]
class MapSemiring[K, V]
class SetSemiring[A]
trait Rig[A]

Value members

Concrete methods

override def additive: CommutativeSemigroup[A]
Definition Classes

Inherited methods

def plus(x: A, y: A): A
Inherited from
AdditiveSemigroup
def sumN(a: A, n: Int): A
Inherited from
AdditiveSemigroup
def trySum(as: IterableOnce[A]): Option[A]

Given a sequence of as, combine them and return the total.

Given a sequence of as, combine them and return the total.

If the sequence is empty, returns None. Otherwise, returns Some(total).

Inherited from
AdditiveSemigroup