MathGroup Archive 2002

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

Search the Archive

RE: Strange ReplaceAll behavior

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36791] RE: [mg36774] Strange ReplaceAll behavior
  • From: "DrBob" <drbob at bigfoot.com>
  • Date: Thu, 26 Sep 2002 04:56:41 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

f[c] == (c+b)/.ru[c] == (c+b)/.c->x == x+b == b+x

Bobby Treat

-----Original Message-----
From: Lawrence A. Walker Jr. [mailto:lwalker701 at earthlink.net] 
To: mathgroup at smc.vnet.net
Subject: [mg36791] [mg36774] Strange ReplaceAll behavior

Hi,

For the life of me I am not sure why the following is not working in my 
v. 4.2:

ru[a]=a->x;
f[x_]:=(a+b) /. ru[a];

Why do I get
f[c] = b+x

and not
f[c] = b+c?

What gives?

Thanks,
Lawrence

-- 
Lawrence A. Walker Jr.
http://www.kingshonor.com





  • Prev by Date: Exporting as space-delimited ASCII file in 3.0?
  • Next by Date: Why can't Mathematica do this simple integral ?
  • Previous by thread: Strange ReplaceAll behavior
  • Next by thread: Re: Strange ReplaceAll behavior