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

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

Search the Archive

Re: Inconsistencies in pattern matching.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13197] Re: Inconsistencies in pattern matching.
  • From: "Allan Hayes" <hay at haystack.demon.cc.uk>
  • Date: Mon, 13 Jul 1998 07:42:45 -0400
  • References: <6n4ro5$o1b@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jrgen Tischer wrote in message <6n4ro5$o1b at smc.vnet.net>...

..........

>What it says is that ReplaceAll is traversing the tree structure of the
>expression breadth first.

..........


Jrgen:
It looks to be a depth first search. For example the following prints
the part being tested for matching.

Clear[a,b,c]

h[a][k[b],c]/.x_/;(Print[x];False)->2

h[a][k[b],c]
h[a]
h
a
k[b]
k
b
c
h[a][k[b],c]

Allan

------------------------------------------------------------- Allan
Hayes
Training and Consulting
Leicester UK
http://www.haystack.demon.co.uk
hay at haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642



  • Prev by Date: Re: Problems using TWJ contour for irregular data (fwd)
  • Next by Date: Re: Starting Sound in Mathematica for Windows
  • Previous by thread: Re: Problems using TWJ contour for irregular data (fwd)
  • Next by thread: Re: How to Extract a common factor from a Sum