In RAC2 you could tack replayLast
onto a signal to make a signal that, when subscribed to, would immediately send the last value and all future values. Is such a thing possible with SignalProducers in RAC4? I don't see any replayLast
.
Asked
Active
Viewed 148 times
0

PICyourBrain
- 9,976
- 26
- 91
- 136
-
Look at `buffer` -- it's definitely possible, but not quite as ergonomic. – Ian Henry Jan 11 '16 at 21:27
-
`buffer` is a class method on SignalProducer that basically gives you a Subject that you can manually feed things into. I can't think of a way to use it for an existing signal unless I do something like subscribe to the events of the signal and `sendNext` each item to the observer. I can't bring myself to do that... – PICyourBrain Jan 12 '16 at 13:11
1 Answers
1
It's likely that what you want to do is better expressed with the new PropertyType
. Otherwise, I am trying to include replayLazily
in RAC 4.

NachoSoto
- 1,743
- 13
- 17