Basic pipe combinators.
- ($$) :: Monad m => Producer a m r' -> Consumer a m r -> m (Maybe r)
- fromList :: Monad m => [a] -> Pipe x a m ()
- nullP :: Monad m => Pipe a b m ()
- fold :: Monad m => (b -> a -> b) -> b -> Pipe a x m b
- consume :: Monad m => Pipe a x m [a]
- take :: Monad m => Int -> Pipe a a m ()
- drop :: Monad m => Int -> Pipe a a m r
- pipeList :: Monad m => (a -> [b]) -> Pipe a b m r
- takeWhile :: Monad m => (a -> Bool) -> Pipe a a m a
- takeWhile_ :: Monad m => (a -> Bool) -> Pipe a a m ()
- dropWhile :: Monad m => (a -> Bool) -> Pipe a a m r
- intersperse :: Monad m => (a -> Bool) -> Pipe a (Maybe a) m r
- groupBy :: Monad m => (a -> a -> Bool) -> Pipe a [a] m r
- filter :: Monad m => (a -> Bool) -> Pipe a a m r
Documentation
($$) :: Monad m => Producer a m r' -> Consumer a m r -> m (Maybe r)
Connect producer to consumer, ignoring producer return value.
fold :: Monad m => (b -> a -> b) -> b -> Pipe a x m b
A fold pipe. Apply a binary function to successive input values and an accumulator, and return the final result.
drop :: Monad m => Int -> Pipe a a m r
Remove the first n
values from the stream, then act as an identity.
pipeList :: Monad m => (a -> [b]) -> Pipe a b m r
Apply a function with multiple return values to the stream.
takeWhile :: Monad m => (a -> Bool) -> Pipe a a m a
Act as an identity until as long as inputs satisfy the given predicate. Return the first element that doesn't satisfy the predicate.
dropWhile :: Monad m => (a -> Bool) -> Pipe a a m r
Remove inputs as long as they satisfy the given predicate, then act as an identity.
intersperse :: Monad m => (a -> Bool) -> Pipe a (Maybe a) m r
Yield Nothing when an input satisfying the predicate is received.