> gather @bin1, @bin2 -> $bin1, $bin2{
>   for @words {
>     $bin1.take if /^^a/;
>     $bin2.take if /e$$/;
>   }
> }

Juerd point out (private email) that my example doesn't really make any
sense in that it doesn't do anything over and above s/take/push.

However, I think the concept of multiple bins could still be useful. My
understand of gather/take is that the function that does the "gather" is
coroutined (if that's a verb) against the block that does the gathering. So
to be able to usefully use multiple streams, the "gather" would need to fork
into multiple threads that are then interleaved with the "gather" block.
Calling a function in junctive context does the forking bit, so a gather
that gathered in a junctive context might make sense as a serialization
mechanism. I can't quite work out what the syntax would be for that though.



Reply via email to