Arrow Libraries (arrows package)ParentContentsIndex
Data.Stream
Portability portable
Stability experimental
Maintainer ross@soi.city.ac.uk
Description
Infinite sequences.
Synopsis
data Stream a = Cons {
shd :: a
stl :: (Stream a)
}
zipStream :: Stream a -> Stream b -> Stream (a, b)
unzipStream :: Stream (a, b) -> (Stream a, Stream b)
listToStream :: [a] -> Stream a
streamToList :: Stream a -> [a]
Documentation
data Stream a
An infinite sequence.
Constructors
Cons
shd :: ahead of the stream
stl :: (Stream a)tail of the stream
Instances
Functor Stream
Monad Stream
zipStream :: Stream a -> Stream b -> Stream (a, b)
Lazy zip of a pair of streams.
unzipStream :: Stream (a, b) -> (Stream a, Stream b)
Lazy unzip of a pair of streams.
listToStream :: [a] -> Stream a
An infinite sequence obtained by padding the list with undefined.
streamToList :: Stream a -> [a]
The infinite list corresponding to a stream.
Produced by Haddock version 0.5