Replace
Replace(expr, lhs -> rhs)
replaces the left-hand-side pattern expression
lhs
inexpr
with the right-hand-siderhs
.
Replace(expr, {lhs1 -> rhs1, lhs2 -> rhs2, ... } )
replaces the left-hand-side patterns expression
lhsX
inexpr
with the right-hand-siderhsX
.
Examples
>> Replace(x, {{e->q, x -> a}, {x -> b}}){a,b}
Related terms
ReplaceAll, ReplaceList, ReplacePart, ReplaceRepeated
Implementation status
- ✅ - full supported