Treatment filter

flow/u16::filter


Inputs

⇥ select: Stream<bool>
⇥ value: Stream<u16>

Outputs

↦ accepted: Stream<u16>
↦ rejected: Stream<u16>


Filter a u16 stream according to bool stream.

ℹ️ If both streams are not the same size nothing is sent through accepted nor rejected.

graph LR
     T("filter()")
     V["… 🟦 🟧 🟪 🟫 🟨 …"] -->|value| T
     D["… 🟩 🟥 🟥 🟩 🟥 …"] -->|select|T
     
     T -->|accepted| A["… 🟦 🟫 …"]
     T -->|rejected| R["… 🟧 🟪 🟨 …"]

     style V fill:#ffff,stroke:#ffff
     style D fill:#ffff,stroke:#ffff
     style A fill:#ffff,stroke:#ffff
     style R fill:#ffff,stroke:#ffff