Syntax: applyrule(rule, expression) where rule is a rule or a set of rules.
The syntax for rule is the same as that used in the pattern matcher. (For more details, see the help page of patmatch.)
A simple manipulation:
One can use parameters in applyrule:
applyrule can be used over data structures: