up previous next
product    --    the product of the elements of a list


Syntax
product(L: LIST): OBJECT
product(L: LIST, InitVal: OBJECT): OBJECT

Description
This function returns the product of the objects in the list L (together with rightmost factor InitVal, if specified). If the list L may be empty, you must specify also InitVal.

Example
/**/  use R ::= QQ[x,y];
/**/  product([3, x, y^2]);
3*x*y^2

/**/  product(1..40) = factorial(40);
true

/**/  product([], y);
y
/**/  product([3, x], y);
3*x*y

See Also