up
previous
next
Product, Sum
Syntax
Product(L:List):OBJECT
Sum(L:List):OBJECT
Summary
the product or sum of the elements of a list
Description
These functions return the product and sum, respectively, of the
objects in the list L.
example
Use R ::= Q[x,y];
Product([3,x,y^2]);
3xy^2
-------------------------------
Sum([3,x,y^2]);
y^2 + x + 3
-------------------------------
Product(1..40)=Fact(40);
TRUE
-------------------------------
Sum(["c","oc","oa"]);
cocoa
-------------------------------
See Also