MathGroup Archive 2006

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

Search the Archive

Re: trivial question


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


  • Prev by Date: Re: question about Block
  • Next by Date: Re: Re: webMathematica, Packages, and hostSRV.com
  • Previous by thread: Re: trivial question
  • Next by thread: Re: trivial question