3 ms·
This is often useful if you're rewriting something that looks like an abstract syntax tree. > And why would it match the wrong value? Because you may be searc
by viraptor 3y ago
This is often useful if you're rewriting something that looks like an abstract syntax tree.
> And why would it match the wrong value?
Because you may be searching the tree for something that looks like `(op(const)(const))` to replace it with `(const)`. But that may live many levels deep inside the structure.
Also, from existing names, that seems very close to MapIf (https://resources.wolframcloud.com/FunctionRepository/resources/MapIf https://resources.wolframcloud.com/FunctionRepository/resour...) just with added recursion.