Condition
Condition(pattern, expr)or
pattern /; exprplaces an additional constraint on
patternthat only allows it to match ifexprevaluates toTrue.
Examples
The controlling expression of a Condition can use variables from the pattern:
>> f(3) /. f(x_) /; x>0 -> tt
>> f(-3) /. f(x_) /; x>0 -> tf(-3)Condition can be used in an assignment:
>> f(x_) := p(x) /; x>0>> f(3)p(3)
>> f(-3)f(-3)Implementation status
- ✅ - full supported