ReplaceAll feature
- To: mathgroup at yoda.physics.unc.edu
- Subject: ReplaceAll feature
- From: Pekka.Janhunen at fmi.fi
- Date: Wed, 7 Oct 1992 09:35:29 -0800
In the following, why is Out[1] different from Out[2] and Out[3]:
Mathematica 2.0 for SGI Iris
Copyright 1988-91 Wolfram Research, Inc.
-- Terminal graphics initialized --
In[1]:= (a+b+c+d)/.{a+b->x,c+d->y}
Out[1]= c + d + x
In[2]:= (a+b+c+d)/.a+b->x/.c+d->y
Out[2]= x + y
In[3]:= (a+b+c+d)//.{a+b->x,c+d->y}
Out[3]= x + y
I guess it has something to do with Flat. This is not a big problem, but IF
it can be easily fixed, it should be fixed. But maybe there are some "deep"
reasons why it behaves like this ?
-------------------------------------------------------------------
Pekka Janhunen tel (+358) 0 1929 535
Finnish Meterological Institute fax (+358) 0 1929 539
Geophysics Department tlx 124436 EFKL SF
P.O.BOX 503, SF-00101 Helsinki
FINLAND
Internet : Pekka.Janhunen at fmi.fi
SPAN & NSI : 22104::pouta::Pekka.Janhunen
EARN/Bitnet : Pekka.Janhunen%fmi.fi at fingate
x.400 : /C=fi/ADMD=Mailnet/PRMD=IL/SUR=Janhunen/GIV=Pekka/
-------------------------------------------------------------------