MathGroup Archive 2006

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

Search the Archive

Re: trivial question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69819] Re: [mg69798] trivial question
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Sat, 23 Sep 2006 23:45:22 -0400 (EDT)
  • References: <200609230844.EAA22579@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.

The first expression's FullForm is (assuming list={1,2,3}):

HoldForm[Plus[1,2,3]]

while the second expression is:

HoldForm[Plus][1,2,3]

In the first case HoldForm formats Plus[1,2,3] without evaluation to get 
1+2+3. In the second case HoldForm formats Plus without evaluation to 
get Plus. However, there is no formatting rule (MakeBoxes) for the head 
HoldForm[Plus], so no further formatting occurs.

Carl Woll
Wolfram Research


  • Prev by Date: Re: Pure function in a pure function (again)
  • Next by Date: Copying cell contents?
  • Previous by thread: trivial question
  • Next by thread: Re: trivial question