Receiver icon indicating copy to clipboard operation
Receiver copied to clipboard

[Suggestion + Implementation] Add combine operator and tests

Open Daniel1of1 opened this issue 6 years ago • 0 comments

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.

Daniel1of1 avatar Jun 01 '19 10:06 Daniel1of1