Treatment merge

std/flow::merge


Generics

◻ T (any)

Inputs

⇥ a: Stream<T>
⇥ b: Stream<T>

Outputs

↦ value: Stream<T>


Merge two streams.

The two streams are merged without predictible order.

ℹ️ Merge continues as long as a or b continues too, while the other can be ended.

graph LR
     T("merge()")
     A["… 🟦 🟫 …"] -->|a| T
     B["… 🟧 🟪 🟨 …"] -->|b| T
     

     T -->|value| V["… 🟦 🟧 🟪 🟫 🟨 …"]

     style V fill:#ffff,stroke:#ffff
     style A fill:#ffff,stroke:#ffff
     style B fill:#ffff,stroke:#ffff