Sequence Organize

std/flow/i32::Organize


Inputs

value: Stream<i32>
pattern: Stream<Vec<void>>

Outputs

↦ values: Stream<Vec<i32>>


Organize stream of i32 into stream of Vec<i32>.

ℹ️ If some remaining values doesn't fit into the pattern, they are trashed. If there are not enough values to fit the pattern, uncomplete vector is trashed.

graph LR
    T(Organize)
    A["… 🟨 🟨 🟨 🟨 🟨 🟨"] -->|value| T
    B["[🟦 🟦] [🟦] [🟦 🟦 🟦]"] -->|pattern| T
    
    T -->|values| O["[🟨 🟨] [🟨] [🟨 🟨 🟨]"]

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