up previous next
Sum

the sum of the elements of a list
Syntax

Product(L:List):OBJECT
Sum(L:List):OBJECT


Description
This function returns the sum of the objects in the list L.

Example
  Use R ::= QQ[x,y];
  Sum([3,x,y^2]);
y^2 + x + 3
-------------------------------
  Sum(1..40) = Bin(41,2);
TRUE
-------------------------------
  Sum(["c","oc","oa"]);
cocoa
-------------------------------


See Also