Rule
Usage
• lhs -> rhs or lhs rhs represents a rule that transforms lhs to rhs.
Notes
• The character  can be entered as -> or \ [Rule]. • lhs -> rhs evaluates rhs immediately. • You can apply rules using Replace. • The assignment lhs = rhs specifies that the rule lhs -> rhs should be used whenever it applies. • lhs rhs can be entered as lhs \[Rule] rhs or lhs -> rhs. • Rule is a scoping construct (see Section A.3.8). • Symbols that occur as pattern names in lhs are treated as local to the rule. This is true when the symbols appear on the right-hand side of /; conditions in lhs, and when the symbols appear anywhere in rhs, even inside other scoping constructs. • New in Version 1; modified in 3.
|