Tests if a
is zero.
Tests if a
is zero.
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.
A vector space is a group
V
that can be multiplied by scalars inF
that lie in a field. Scalar multiplication must distribute over vector addition (x *: (v + w) === x *: v + x *: w
) and scalar addition ((x + y) *: v === x *: v + y *: v
). Scalar multiplication by 1 inF
is an identity function (1 *: v === v
). Scalar multiplication is "associative" (x *: y *: v === (x * y) *: v
).