Copyright | (c) 2019 Composewell Technologies |
---|---|
License | BSD3 |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Step s a
- data Pipe m a b = forall s1 s2. Pipe (s1 -> a -> m (Step (PipeState s1 s2) b)) (s2 -> m (Step (PipeState s1 s2) b)) s1
- data PipeState s1 s2
- zipWith :: Monad m => (a -> b -> c) -> Pipe m i a -> Pipe m i b -> Pipe m i c
- tee :: Monad m => Pipe m a b -> Pipe m a b -> Pipe m a b
- map :: Monad m => (a -> b) -> Pipe m a b
- compose :: Monad m => Pipe m b c -> Pipe m a b -> Pipe m a c
Documentation
forall s1 s2. Pipe (s1 -> a -> m (Step (PipeState s1 s2) b)) (s2 -> m (Step (PipeState s1 s2) b)) s1 |
Represents a stateful transformation over an input stream of values of
type a
to outputs of type b
in Monad
m
.
zipWith :: Monad m => (a -> b -> c) -> Pipe m i a -> Pipe m i b -> Pipe m i c Source #
The composed pipe distributes the input to both the constituent pipes and zips the output of the two using a supplied zipping function.
Since: 0.7.0