streamly-0.8.1.1: Dataflow programming and declarative concurrency
Copyright(c) 2019 Composewell Technologies
LicenseBSD3
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Streamly.Internal.Data.Stream.StreamDK

Description

 
Synopsis

Stream Type

data Stream m a Source #

data Step m a Source #

Constructors

Yield a (Stream m a) 
Stop 

Construction

nil :: Monad m => Stream m a Source #

cons :: Monad m => a -> Stream m a -> Stream m a Source #

consM :: Monad m => m a -> Stream m a -> Stream m a Source #

unfoldr :: Monad m => (b -> Maybe (a, b)) -> b -> Stream m a Source #

unfoldrM :: Monad m => (s -> m (Maybe (a, s))) -> s -> Stream m a Source #

replicateM :: Monad m => Int -> a -> Stream m a Source #

Folding

uncons :: Monad m => Stream m a -> m (Maybe (a, Stream m a)) Source #

foldrS :: Monad m => (a -> Stream m b -> Stream m b) -> Stream m b -> Stream m a -> Stream m b Source #

Lazy right associative fold to a stream.

Specific Folds

drain :: Monad m => Stream m a -> m () Source #