Tests if a
is zero.
Tests if a
is zero.
Returns a
multiplied with itself n
times.
Returns a
multiplied with itself n
times. For instance,
a pow 3 === a * a * a
. Since this is a semiring, there is no notion of
a multiplicative identity, and so the exponent must be positive.
Given a sequence of as
, sum them using the semigroup and return the total.
Given a sequence of as
, sum them using the semigroup and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
Return a
multiplied with itself n
times.
Return a
multiplied with itself n
times.
Given a sequence of as
, sum them using the monoid and return the total.
Given a sequence of as
, sum them using the monoid and return the total.
Given a sequence of as
, sum them using the semigroup and return the total.
Given a sequence of as
, sum them using the semigroup and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
Return a
added with itself n
times.
Return a
added with itself n
times.
Rng is a ring whose multiplicative structure doesn't have an identity (i.e. it is semigroup, not a monoid). Put another way, a Rng is a Ring without an identity.