MathGroup Archive 1999

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

Search the Archive

Re: Pure Functions in rules


Will Self asks why this doesn't work:

In[80]:=     {1,2,3} /. (m_List -> (2*#& /@ m))
Out[80]=    {1,2,3}

A delayed rule is needed. Try

{1,2,3} /. m_List :> (2#&)/@m

David Park
djmp at earthlink.net





  • Prev by Date: Re: Plot[] problem (plnr) - help !!!
  • Next by Date: Re: Pure Functions in rules
  • Previous by thread: Re: Pure Functions in rules
  • Next by thread: Re: Pure Functions in rules