mapFilterSP, filterLeftSP, et al


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


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.


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

See Also

mapSP, filterSP.