Returns an instance of T
calculated by summing all instances in
iter
in one pass.
Returns an instance of T
calculated by summing all instances in
iter
in one pass. Returns None
if iter
is empty, else
Some[T]
.
instances of T
to be combined
None
if iter
is empty, else an option value containing the summed T
Ring: Group + multiplication (see: http://en.wikipedia.org/wiki/Ring_%28mathematics%29) and the three elements it defines:
Note, if you have distributive property, additive inverses, and multiplicative identity you can prove you have a commutative group under the ring: