¤ idSP, filterSP, et al

Types

idSP :: SP a a
filterSP :: (a -> Bool) -> SP a a
mapSP :: (a -> b) -> SP a b
concatMapSP :: (a -> [b]) -> SP a b
mapAccumlSP :: (a -> b -> (a, c)) -> a -> SP b c
concatMapAccumlSP :: (a -> b -> (a, [c])) -> a -> SP b c
concatSP :: SP [a] a
zipSP :: [a] -> SP b (a, b)
splitAtElemSP :: (a -> Bool) -> Cont (SP a b) [a]
chopSP :: ((a -> SP b a) -> SP b a) -> SP b a

type Cont a b = (b -> a) -> a

Description

These are some common stream processors. idSP is the identity stream processor, i.e., a short-circuit from its input to its output. mapSP f is a stream processor that outputs f x when it receives x on its input and thus is the equivalent of map for lists.

The other stream processors too are equivalent to the similarly named list functions.

See Also

splitSP