¤ compEitherSP, compMsgSP

Types

compEitherSP :: SP a b -> SP c d -> SP (Either a c) (Either b d)
compMsgSP :: SP a b -> SP c d -> SP (Message a c) (Message b d)

Synopsis

compEitherSP sp1 sp2

type Either = ??
data Message a b = Low a | High b

Description

These combinators provide tagged parallel composition of stream processors The output streams from the individual stream processors are tagged and merged into a single stream. The input stream, which must be tagged, is split up and fed to the appropriate stream processor.

The below description is for compEitherSP. compMsgSP is the same, except that it uses the type Message instead of Either.

Input

Messages tagged Left and Right are sent to the left and right stream processors, respectively.

Output

Messages from the left and right stream processors are tagged Left and Right, respectively.

Arguments

sp1 :: SP a b
left stream processor
sp2 :: SP c d
right stream processor.

See Also

Untagged parallel composition: parSP.

The corresponding fudget combinator: >+<.

Serial composition: serCompSP.