MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Product


On 11 Apr., 07:44, "Steven" <steven_... at telenet.be> wrote:
> Silly beginner's question: is there a function to multiply all elements of a
> list, like Total does for addition?
> 'fraid I can't find it.
> TIA

Hallo Steven,

Apply[Times, {a, b, c}] will do. It works not only for Times, but for
any function f:

Apply[f, {a, b, c}] gives f[a, b, c]

Apply[Plus, {a, b, c}] gives a + b + c

Udo


  • Prev by Date: Re: Product
  • Next by Date: Re: max and min
  • Previous by thread: Re: Product
  • Next by thread: Re: Product