The fibonacciSequence example was really helpful. I made a new class
PowerSeries, a subclass of Generator. Then I defined a binary operation +
as follows:
+ aPowerSeries
^ PowerSeries on: [ :ps |
| a b |
[ a := self next.
b := aPowerSeries next.
ps yield: (a + b) ]
rep
I took a look at the numerical methods book, but it seems oriented to
actually evaluating an infinite series up to a certain accuracy. With
formal power series all we want are the coefficients. For example, consider
the series
S = 1 + x + x^2 + x^3 + ...
The coefficients are an infinite list [1
I am just learning Pharo (taking the MOOC actually!) and am wondering whether
it is possible to model formal power series. I have done this in Haskell
quite easily and efficiently, but struggled to do it in Python without real
success. It requires one to perform operations on an infinite stream (