hw-streams-0.0.0.2: Primitive functions and data types

Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.Streams.Stream

Documentation

data Stream a where Source #

Constructors

Stream :: (s -> Step s a) -> s -> Size -> Stream a 
Instances
Functor Stream Source # 
Instance details

Defined in HaskellWorks.Data.Streams.Stream

Methods

fmap :: (a -> b) -> Stream a -> Stream b #

(<$) :: a -> Stream b -> Stream a #

data Step s a Source #

Constructors

Yield a s 
Skip s 
Done 
Instances
Functor (Step s) Source # 
Instance details

Defined in HaskellWorks.Data.Streams.Stream

Methods

fmap :: (a -> b) -> Step s a -> Step s b #

(<$) :: a -> Step s b -> Step s a #

zipWith :: (a -> b -> c) -> Stream a -> Stream b -> Stream c Source #

zipWithState :: (a -> b -> s -> (c, s)) -> s -> Stream a -> Stream b -> Stream c Source #

enumFromStepN :: Num a => a -> a -> Int -> Stream a Source #

foldl :: (a -> b -> a) -> a -> Stream b -> a Source #

drop :: Int -> Stream a -> Stream a Source #

repeat :: Int -> a -> Stream a Source #

transcribe :: (s -> a -> b) -> s -> Stream a -> Stream b Source #