Skip to content

Rule ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.

Pattern replacement rule.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageRule✓
Rule(match: expression, replace: expression, predicate: function?) -> expressionas compute-engine declares it
Typed signatures
TypePackageApplies
(match: expression, replace: expression, predicate: function?) -> expressioncompute-enginealways

Domain: Compute engine

Examples

Basic #
live ↗
InReplaceAll([x,x2,a,b],Rule(x,3))\mathrm{ReplaceAll}(\bigl\lbrack x, x^2, a, b\bigr\rbrack, \mathrm{Rule}(x, 3))Out[3,9,a,b]\bigl\lbrack3, 9, a, b\bigr\rbrack
Scope #
live ↗
InReplaceAll([x,x2,x3,a,b],Rule(x2,y))\mathrm{ReplaceAll}(\bigl\lbrack x, x^2, x^3, a, b\bigr\rbrack, \mathrm{Rule}(x^2, y))Out[x,y,x3,a,b]\bigl\lbrack x, y, x^3, a, b\bigr\rbrack
Properties #
live ↗
InReplaceAll(x,Rule(x,KeyValuePair⁡(y,z)))\mathrm{ReplaceAll}(x, \mathrm{Rule}(x, \operatorname{KeyValuePair}(y, z)))Out(y,z)(y,z)
About
Examples3
Checked againstWolfram Language 3 agree
CrosswalkWolfram Language