Safe Haskell | Safe-Inferred |
---|---|

Language | Haskell2010 |

## Synopsis

- data Infinite a = Inf a (Infinite a)
- head :: Infinite a -> a
- tail :: Infinite a -> Infinite a
- filter :: (a -> Bool) -> Infinite a -> Infinite a
- (++) :: Foldable f => f a -> Infinite a -> Infinite a
- unfoldr :: (b -> (a, b)) -> b -> Infinite a
- (!!) :: Infinite a -> Int -> a
- groupBy :: (a -> a -> Bool) -> Infinite a -> Infinite (NonEmpty a)
- dropList :: [a] -> Infinite b -> Infinite b
- iterate :: (a -> a) -> a -> Infinite a
- concatMap :: Foldable f => (a -> f b) -> Infinite a -> Infinite b
- allListsOf :: [a] -> Infinite [a]
- toList :: Infinite a -> [a]
- repeat :: a -> Infinite a

# Documentation

#### Instances

Foldable Infinite Source # | |

Defined in GHC.Data.List.Infinite fold :: Monoid m => Infinite m -> m Source # foldMap :: Monoid m => (a -> m) -> Infinite a -> m Source # foldMap' :: Monoid m => (a -> m) -> Infinite a -> m Source # foldr :: (a -> b -> b) -> b -> Infinite a -> b Source # foldr' :: (a -> b -> b) -> b -> Infinite a -> b Source # foldl :: (b -> a -> b) -> b -> Infinite a -> b Source # foldl' :: (b -> a -> b) -> b -> Infinite a -> b Source # foldr1 :: (a -> a -> a) -> Infinite a -> a Source # foldl1 :: (a -> a -> a) -> Infinite a -> a Source # toList :: Infinite a -> [a] Source # null :: Infinite a -> Bool Source # length :: Infinite a -> Int Source # elem :: Eq a => a -> Infinite a -> Bool Source # maximum :: Ord a => Infinite a -> a Source # minimum :: Ord a => Infinite a -> a Source # | |

Traversable Infinite Source # | |

Defined in GHC.Data.List.Infinite | |

Applicative Infinite Source # | |

Defined in GHC.Data.List.Infinite | |

Functor Infinite Source # | |

allListsOf :: [a] -> Infinite [a] Source #

Compute all lists of the given alphabet.
For example: `allListsOf`

"ab" = ["a", "b", "aa", "ba", "ab", "bb", "aaa", "baa", "aba", ...]