haskus-utils-data-1.3: Haskus data utility modules

Safe HaskellSafe
LanguageHaskell2010

Haskus.Utils.InfList

Description

Infinite list

Synopsis

Documentation

data InfList a Source #

An infinite list

Constructors

a :> (InfList a) 
Instances
Functor InfList Source # 
Instance details

Defined in Haskus.Utils.InfList

Methods

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

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

Foldable InfList Source # 
Instance details

Defined in Haskus.Utils.InfList

Methods

fold :: Monoid m => InfList m -> m #

foldMap :: Monoid m => (a -> m) -> InfList a -> m #

foldr :: (a -> b -> b) -> b -> InfList a -> b #

foldr' :: (a -> b -> b) -> b -> InfList a -> b #

foldl :: (b -> a -> b) -> b -> InfList a -> b #

foldl' :: (b -> a -> b) -> b -> InfList a -> b #

foldr1 :: (a -> a -> a) -> InfList a -> a #

foldl1 :: (a -> a -> a) -> InfList a -> a #

toList :: InfList a -> [a] #

null :: InfList a -> Bool #

length :: InfList a -> Int #

elem :: Eq a => a -> InfList a -> Bool #

maximum :: Ord a => InfList a -> a #

minimum :: Ord a => InfList a -> a #

sum :: Num a => InfList a -> a #

product :: Num a => InfList a -> a #

toList :: InfList a -> [a] Source #

Convert to a standard list

repeat :: a -> InfList a Source #

Repeat for infinite list

take :: Word -> InfList a -> [a] Source #

Take for infinite list

replicate :: Word -> a -> InfList a -> InfList a Source #

Replicate for infinite list