


![[top]](top.gif)
Synopsis:
sum v -- yields the sum of the elements in the tally v.
i1 : a = tally{1,1,1,1,1,10,10,10,100,100} |
i2 : sum a |
See also:
Code:
-- ../../../Macaulay2-0.9.2/Macaulay2/m2/set.m2:29
sum(Tally) := (w) -> sum(pairs w, (k,v) -> v * k)



![[top]](top.gif)