Re: precedence for ReplaceAll?
- To: mathgroup at smc.vnet.net
- Subject: [mg110584] Re: precedence for ReplaceAll?
- From: AES <siegman at stanford.edu>
- Date: Sat, 26 Jun 2010 03:12:34 -0400 (EDT)
- Organization: Stanford University
- References: <firstname.lastname@example.org>
In article <i023mj$r4u$1 at smc.vnet.net>, Bill Rowe <readnews at sbcglobal.net> wrote: > >My first guess is that Mathematica is doing a sort of "double > >ReplaceAll", where it first tries the pattern given in the delayed > >assignment, and any symbols matched by that are not tested against > >the explicit ReplaceAll. But that doesn't explain why the sum works > >and not the product. Am I thinking about this the wrong way? > > Yes, your thinking here is incorrect. Just be to be argumentative here: The OP's thinking obviously doesn't agree with what Mathematica actually does. But what Mathematica does is not the only standard of correctness, or even reasonableness, in the world. His thinking is not unreasonable, and not even incorrect by some reasonable standards.