Copyright | (c) 2017 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Low level functions using StreamK as the intermediate stream type. These functions are used in other stream modules to implement their instances.
Synopsis
- fromList :: Monad m => [a] -> StreamK m a
- toList :: Monad m => StreamK m a -> m [a]
- foldr :: Monad m => (a -> b -> b) -> b -> StreamK m a -> m b
- foldl' :: Monad m => (b -> a -> b) -> b -> StreamK m a -> m b
- fold :: Monad m => Fold m a b -> StreamK m a -> m b
- eqBy :: Monad m => (a -> b -> Bool) -> StreamK m a -> StreamK m b -> m Bool
- cmpBy :: Monad m => (a -> b -> Ordering) -> StreamK m a -> StreamK m b -> m Ordering
Conversion operations
fromList :: Monad m => [a] -> StreamK m a Source #
fromList =foldr
cons
nil
Construct a stream from a list of pure values. This is more efficient than
fromFoldable
for serial streams.
toList :: Monad m => StreamK m a -> m [a] Source #
Convert a stream into a list in the underlying monad.