The line
Bar(fizzes, buzzes).Subscribe(f => fizzes.OnNext(f));
can be made simpler and changed to
Bar(fizzes, buzzes).Subscribe(fizzes);
as the Subscribe
method takes an IObserver
, the lambda methods that are normally used are just shortcuts for this.
As such, fizzes
is being used as an IObserver
and an IObservable
, which is the definition of a Subject
. If this is the behavior that you want, then a Subject
is probably the way to go.