Re: trivial question
- To: mathgroup at smc.vnet.net
- Subject: [mg69804] Re: trivial question
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 23 Sep 2006 06:14:46 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <ef2tn1$mnf$1@smc.vnet.net>
dimmechan at yahoo.com wrote:
> Hi.
>
> I think this is rather trivial, but I can think something right now.
>
> Why the commands below result in different output?
>
> (HoldForm[+##1]&)@@list
> 1+2+3
>
> HoldForm[Plus]@@list
> Plus[1,2,3]
>
> Thanks in advance.
>
In[1]:=
list={1,2,3};
In[2]:=
(HoldForm[+##1]&)@@list//Trace
Out[2]=
{{list,{1,2,3}},(+##1&)@@{1,2,3},(+##1&)[1,2,3],1+2+3}
In[3]:=
HoldForm[Plus]@@list//Trace
Out[3]=
{{list,{1,2,3}},Plus@@{1,2,3},Plus[1,2,3]}
Regards,
Jean-Marc