Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Lost myHead, please help !!!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22370] Re: [mg22335] Lost myHead, please help !!!
  • From: Ken <Kenneth_Levasseur at uml.edu>
  • Date: Sat, 26 Feb 2000 22:04:57 -0500 (EST)
  • Organization: UMass Lowell
  • References: <200002260213.VAA05738@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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 !!!