IOSpec-0.1: A pure specification of the IO monad.Source codeContentsIndex
Data.Stream
Description
Streams are infinite lists. Most operations on streams are completely analogous to the definition in Data.List.
Documentation
data Stream a Source
Constructors
Cons a (Stream a)
show/hide Instances
head :: Stream a -> aSource
tail :: Stream a -> Stream aSource
intersperse :: a -> Stream a -> Stream aSource
iterate :: (a -> a) -> a -> Stream aSource
repeat :: a -> Stream aSource
cycle :: [a] -> Stream aSource
unfold :: (c -> (a, c)) -> c -> Stream aSource
take :: Int -> Stream a -> [a]Source
drop :: (Num a, Ord a) => a -> Stream a1 -> Stream a1Source
splitAt :: Int -> Stream a -> ([a], Stream a)Source
takeWhile :: (a -> Bool) -> Stream a -> [a]Source
dropWhile :: (a -> Bool) -> Stream a -> Stream aSource
span :: (a -> Bool) -> Stream a -> ([a], Stream a)Source
break :: (a -> Bool) -> Stream a -> ([a], Stream a)Source
isPrefixOf :: Eq a => [a] -> Stream a -> BoolSource
filter :: (a -> Bool) -> Stream a -> Stream aSource
partition :: (a -> Bool) -> Stream a -> (Stream a, Stream a)Source
(!!) :: Int -> Stream a -> aSource
zip :: Stream a -> Stream b -> Stream (a, b)Source
zipWith :: (a -> b -> c) -> Stream a -> Stream b -> Stream cSource
unzip :: Stream (a, b) -> (Stream a, Stream b)Source
words :: Stream Char -> Stream StringSource
unwords :: Stream String -> Stream CharSource
lines :: Stream Char -> Stream StringSource
unlines :: Stream String -> Stream CharSource
listToStream :: [t] -> Stream [t]Source
streamToList :: Stream a -> [a]Source
Produced by Haddock version 2.6.0