ReplaceList
ReplaceList(expr, lhs -> rhs)
or
ReplaceList(expr, lhs :> rhs)
replaces the left-hand-side pattern expression
lhs
inexpr
with the right-hand-siderhs
.
Examples
>> ReplaceList(a+b+c,(x_+y_) :> {{x},{y}}){{{a},{b+c}},{{b},{a+c}},{{c},{a+b}},{{a+b},{c}},{{a+c},{b}},{{b+c},{a}}}
Related terms
Replace, ReplaceAll, ReplacePart, ReplaceRepeated
Implementation status
- ✅ - full supported