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.
The L_p norm is equal to the
p-th root of the sum of each element to the powerp. For instance, ifp = 1we have the Manhattan distance. If you'd like the Euclidean norm (p = 2), then you'd probably be best to use anInnerProductSpaceinstead.