Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Multicast

Lets one query use the same input stream more than once.

Multicast(s => ...) gives the function a shared stream s. Every branch the function builds from s shares one subscription to the source, so the source is read once however many branches use it.

In the diagram, one branch keeps key a and the other keeps values above 2, and the two are unioned. a:3 passes both filters, so it appears twice in the output: Union does not deduplicate.

See also: Union, Where