Receiver
Receiver copied to clipboard
[Suggestion + Implementation] Add combine operator and tests
Add a function of type:
func combine<A,B>(_ ra: Receiver<A>, _ rb: Receiver<B>) -> Receiver<(A,B)>
Discussion points:
- Whether it is necessary 😊
- should it be a free function or method on a receiver (or both) i.e
let r3 = combine(r1,r2)
//vs
let r3 = r1.combine(r2)
- Code styling, this is a first pass at an implementation.
- Waiting semantics, whether we give values of (A?,B?) or similar when one side has not received a value yet.