lhs:>rhs or lhsrhs
represents a rule that transforms lhs to rhs, evaluating rhs only after the rule is used.
- The character can be entered as :> or ∖[RuleDelayed].
- RuleDelayed has the attribute HoldRest.
- You can apply rules using Replace.
- The assignment lhs:=rhs specifies that the rule lhs:>rhs should be used whenever it applies.
- You can use Condition to specify when a particular rule applies.
- In StandardForm, RuleDelayed is printed using .
Examplesopen allclose all
Basic Examples (1)
Evaluate the StepMonitor expression separately each time it is to be used:
Properties & Relations (6)
Module effectively uses a renamed instance of y:
By evaluating the arguments to RuleDelayed, local scoping is avoided:
KeyValuePattern can be used to transform a list of rules: