sum |
Syntax |
sum(L: LIST): OBJECT sum(L: LIST, InitVal: OBJECT): OBJECT |
Description |
Example |
/**/ use R ::= QQ[x,y]; /**/ sum([3, x, y^2]); y^2 +x +3 /**/ sum(1..40) = binomial(41,2); true /**/ sum(["c","oc","oa"]); cocoa /**/ sum([]); -- gives 0 of type INT 0 /**/ sum([], ""); -- gives empty STRING /**/ sum([], x); -- gives type RINGELEM x |
See Also |