Add `fork` function
Suggestion
β Suggestion
π» Use Cases
This issue closed without implementing
Would be nice to have multicast of Iterable/AsyncIterable via fork fn for independent parallel consuming
Like RxJS share, that multicast Observable
Thank you for your interest :)
We've only dealt with unicast so far. Looking at rxjs, it seems like multicast could also be useful.
Is there an expression you're thinking of?
ex)
const add1 = pipe(
[1,2,3,4],
map(a => a+1),
)
const forkedAdd1 = fork(add1);
const forkedAdd2 = fork(add1);
forkedAdd1.next(); // 2
forkedAdd1.next(); // 3
forkedAdd2.next(); // 2
forkedAdd3.next(); // 3
Yep, for allowance of stream multicasting to independent substreams
(if image π is dark, feel to open it on new tab)
Inspiration: https://github.com/iter-tools/iter-tools/blob/d7.5/API.md#fork
@darky
Inspiration: https://github.com/iter-tools/iter-tools/blob/d7.5/API.md#fork
Thank you for the good reference! I'm busy with work right now, so it might take some time before I add itπ
Let me know if you're interested in contributing