loopSP :: SP a a -> SP a a loopLeftSP :: SP (Either a b) (Either a c) -> SP b c
type Either = ??
The loop combinators construct circular connections between stream processors.
loopSP sp and
loopLeftSP sp can be illustrated as:
loopSP is an untagged loop combinator. Output from
is propagated both to the output and to the loop.
loopLeftSP is a tagged loop combinator. Output from
sent to the output of the composition if it is tagged
Right and to
the loop if it is tagged
Left. Similarly, input to
Right if it comes from the input of the composition and
Left if it comes from the loop.
loopSP (sp1 `serCompSP` sp2)This shows a way to obtain bidirectional communication between two stream processors.
The corresponding fudget combinators: loopF, loopLeftF.