Hello !
I try more and more to do frp in my apps and I kinda enjoy it :) But recently, I struggled with a problem. I probably miss an obvious solution...
I've got a Bus A and I create a stream resulting of the number of different consecutive elements, let's call it stream B. Nothing difficult here.
I have also a Bus C. And for each event pushed to this bus, I want to reset the value of the stream B to 0.
I tried to do something like this, to make a kind of "reset" of A :
A = C.flatMapLatest(function () {
return new Bacon.Bus();
});
But A will be a stream so I can't push any value to it...
Like I said, it may be obvious but I can't find a good and simple solution :/
Cheers,
Thomas Crevoisier