.. (לתיקייה המכילה) | ||
In PolyStream::substitute method - should we also consider future changes or the effect is limited only on the current PolyStream? | |
The effect is limited only for the current PolyStream. That is, when you receive the message 'substitute: n' you should change the internal state of the current f(x) to f(nx). Future additions to the PolyStream should not be affected. For example: p := PolyStream new. p addCoef: 1 withExp: 1. "f(x) = x" p substitute: 2. "f(2x)" p addCoef: 5 withExp: 2. "5x^2+f(2x). NOT 10x^2 + f(2x)" |