Re: Re: Product
- To: mathgroup at smc.vnet.net
- Subject: [mg87552] Re: [mg87491] Re: Product
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sat, 12 Apr 2008 07:03:49 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <ftmtsj$4lf$1@smc.vnet.net> <200804110956.FAA08319@smc.vnet.net>
- Reply-to: murray at math.umass.edu
But of course Total is also redundant! Plus @ {1,2,3,4}
So the issue is one of language design: when does a particular case of a
more general construction occur so frequently that a special function
should be introduced for it.
Szabolcs Horv=E1t wrote:
> Steven wrote:
>> Silly beginner's question: is there a function to multiply all elements of a
>> list, like Total does for addition?
>
> No, there isn't. But it would be redundant anyway because it is very
> easy to build your own:
>
> In[1]:= Times @@ {1, 2, 3, 4, 5}
> Out[1]= 120
>
> Look up Apply in the documentation.
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Re: Product
- From: Szabolcs Horvát <szhorvat@gmail.com>
- Re: Product