Re: ReplaceAll strange behaviour
- To: mathgroup at smc.vnet.net
- Subject: [mg9340] Re: ReplaceAll strange behaviour
- From: Hein Hundal <junkmail at vicon.net>
- Date: Sat, 1 Nov 1997 03:33:26 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Gadi Oron wrote: > > Hello, > > Can anybody enlighten me with the following strange result? > > In:= {{1,2},{2,3}} /. {x_ /; Head[x]!=List,y_}:> Circle[{x,y},1] Out:= > {{1,2},{2,3}} > [snip] The problem occurs because (Integer != List) does not return True. Instead you want to uses =!=. The following expression works on my machine w/ Mathematica 3.0. {{1,2},{2,3}} /. {x_ /; Head[x]=!=List,y_}:> Circle[{x,y},1] Cheers, Hein email replies to hundalhm at vicon.net