ReplaceAll on Nested Expressions
- To: mathgroup at smc.vnet.net
- Subject: [mg92931] ReplaceAll on Nested Expressions
- From: "David Park" <djmpark at comcast.net>
- Date: Mon, 20 Oct 2008 07:33:43 -0400 (EDT)
Here is an attempted replacement: foo[foo[a, b], c] /. foo[a_, b_] :> foo[a, h[b]] foo[foo[a, b], h[c]] How could I write a rule, or what method would I use so that the inner foo[a,b] is also replaced? foo[foo[a, h[b]], h[c]] -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/