| Author |
Comment/Response |
Peter Pein
|
10/30/11 09:44am
Hi,
simply replace a list of zero or more rules by that list with your rule appended:
In[1]:= additional = Value -> 3;
In[2]:= Solve[x^2 - 4 == 0, x] /. {r___Rule} :> {r, additional}
Out[2]= {{x -> -2, Value -> 3}, {x -> 2, Value -> 3}}
In[3]:= Solve[x^2 + 4 == 0, x, Reals] /. {r___Rule} :> {r, additional}
Out[3]= {Value -> 3}
Peter
URL: , |
|