mapFilterSP, filterLeftSP, et al

Types

mapFilterSP :: (a -> Maybe b) -> SP a b
filterLeftSP :: SP (Either a b) a
filterRightSP :: SP (Either a b) b
filterJustSP :: SP (Maybe a) a

Description

These stream processor applies a "partial" function to the input messages and output the result, if it is defined. In case of mapFilterSP, the function is supplied as an argument. Otherwise, the function is built-in.

Equalities

filterLeftSP  = mapFilterSP stripLeft
filterRightSP  = mapFilterSP stripRight
filterJustSP = mapFilterSP id

See Also

mapSP, filterSP.