RemoveFunction
RemoveFunction[ expr, func ]
RemoveFunction[ expr, func ] removes all occurrences of a given function from an expression.
| Example | in | out |
|---|---|---|
| Removing the quantity "meter" from an expression. | RemoveFunction[Solution[x=Quantity[3, 'm'], x], Quantity] |
Solution[x=3, x] |
Options
RemoveChildren
RemoveChildren removes the entire subexpression that starts with func if set to True. If False, only remove the head of the subexpression, and keep the first child. False by default.
| Syntax | Example |
|---|---|
RemoveFunction[ expr,func,RemoveChildren=>False] |
RemoveFunction[ expr,func,False] |
Skip
Skip skips over func if it is contained within the function or functions given.
| Syntax | Example |
|---|---|
RemoveFunction[ expr,func,Skip=>[func1, func2, ...] |
RemoveFunction[ expr, func1, func2] |