Sequence Organize

std/flow/char::Organize


Inputs

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

Outputs

↦ values: Stream<Vec<char>>


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

ℹ️ 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