Hot answers tagged expression-manipulation
The two examples in this question relate to two different aspects of pattern matching. I will start with the simpler to understand and intentional aspect, which is the second example. g /. g[ 1 + (1|other) ] -> post (* g *) In the above, the pattern doesn't match, and it can never match. g has one argument. Since Plus is OneIdentity, 2 ...
Only top voted, non community-wiki answers of a minimum length are eligible