MathGroup Archive 2000

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

Search the Archive

Re: Lost myHead, please help !!!


Antoine:

You can use Apply:

In[1]:=
x = {{a}, {b, c}}
Out[1]=
{{a}, {b, c}}
In[2]:=
Apply[myhead, x]
Out[2]=
myhead[{a}, {b, c}]

The short form would be myhead@@x

Ken Levasseur
UMass Lowell

Antoine Zahnd wrote:
> 
> Hello everybody,
> 
> I can't do the following (sigh)
> 
> Let x = {{a},{b,c}}
> 
> I would like to tranform it into something like myHead[{a},{b,c}]
> 
> Of course x /. {List->myHead} doesn't work !
> 
> Certainly it is simple, but so far I didn't get it.
> 
> Thank you for your help.
> 
> antoine.zahnd at iprolink.ch


  • Prev by Date: simple plot
  • Next by Date: Re: Help needed: How to add constraints into FullSimplify
  • Previous by thread: Lost myHead, please help !!!
  • Next by thread: Re: Lost myHead, please help !!!