MathGroup Archive 2008

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

Search the Archive

Re: Product

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87502] Re: Product
  • From: udohackl at web.de
  • Date: Fri, 11 Apr 2008 05:58:44 -0400 (EDT)
  • References: <ftmtsj$4lf$1@smc.vnet.net>

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