Factory functions that open a feed over values and data sources.
Feeds open the Feed a pipe is built on, adapting values and data sources into one ready for task
and sink composition; several feeds are combined into a single one by carrying them in a feed of their own and
splicing it with flat or join. Work is deferred until a sink or a manual
iteration consumes the feed.
Every feed is classified as bounded or infinite: a bounded feed runs dry on its own, while an infinite one
has to be bounded downstream, with a task such as take or with a sink deciding its outcome
early.
Note
A custom feed is only required to honour the Feed contract, however it is assembled: handing
the source to items is the shortest route there, as the adapter takes the contract on, while a source
that is already a feed honours it as it is. Whichever route is taken, a feed replays only as far as its source
does, so one opened from a generator object runs dry after the first pass, while one opened from a repeatable
source is consumed afresh at each.
Custom Feeds open a pipe over a source of your own:
Factory functions that open a feed over values and data sources.
Feeds open the Feed a pipe is built on, adapting values and data sources into one ready for task and sink composition; several feeds are combined into a single one by carrying them in a feed of their own and splicing it with flat or join. Work is deferred until a sink or a manual iteration consumes the feed.
Every feed is classified as bounded or infinite: a bounded feed runs dry on its own, while an infinite one has to be bounded downstream, with a task such as take or with a sink deciding its outcome early.
A custom feed is only required to honour the Feed contract, however it is assembled: handing the source to items is the shortest route there, as the adapter takes the contract on, while a source that is already a feed honours it as it is. Whichever route is taken, a feed replays only as far as its source does, so one opened from a generator object runs dry after the first pass, while one opened from a repeatable source is consumed afresh at each.
Custom Feeds open a pipe over a source of your own: