¤ loopThroughRightSP

Stream processor combinators that create circular connections

Types

loopThroughRightSP :: SP (a1  b1) (a2  b2) -> SP a2 a1 -> SP b1 b2

Description

loopThroughRightSP is a variation of the loop combinators that has turned out to be useful when re-using stream processors. loopThroughRightSP spnew spold connects two stream processors as shown in the diagram below:

The loop obtained with loopThroughRightSP spnew spold is like the loop obtained with loopLeftSP spnew, with the addition that the loop goes through spold. spold can only communicate with the outside world by going via spnew and is in this sense encapsulated inside spnew.

See Also

Simpler loop combinators: loopSP, loopLeftSP.

The corresponding fudget combinator: loopThroughRightF.