Treatment fit

flow/vec/i32::fit


Inputs

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

Outputs

↦ fitted: Stream<Vec<i32>>


Fit a stream of i32 into stream of Vec<i32>, using a pattern.

ℹ️ 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("fit()")
     A["… 🟨 🟨 🟨 🟨 🟨 🟨"] -->|value| T
     B["[🟦 🟦][🟦][🟦 🟦 🟦]"] -->|pattern| T
     
     T -->|fitted| O["[🟨 🟨][🟨][🟨 🟨 🟨]"]

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