Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*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 1999

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

Search the Archive

Re: Pure Functions in rules

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15991] Re: [mg15932] Pure Functions in rules
  • From: "Park" <djmp at earthlink.net>
  • Date: Fri, 19 Feb 1999 03:27:07 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

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