Safe Haskell | None |
---|---|
Language | GHC2021 |
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
Applicative Infinite Source # | |
Functor Infinite Source # | |
Foldable Infinite Source # | |
Defined in GHC.Data.List.Infinite fold :: Monoid m => Infinite m -> m # foldMap :: Monoid m => (a -> m) -> Infinite a -> m # foldMap' :: Monoid m => (a -> m) -> Infinite a -> m # foldr :: (a -> b -> b) -> b -> Infinite a -> b # foldr' :: (a -> b -> b) -> b -> Infinite a -> b # foldl :: (b -> a -> b) -> b -> Infinite a -> b # foldl' :: (b -> a -> b) -> b -> Infinite a -> b # foldr1 :: (a -> a -> a) -> Infinite a -> a # foldl1 :: (a -> a -> a) -> Infinite a -> a # elem :: Eq a => a -> Infinite a -> Bool # maximum :: Ord a => Infinite a -> a # minimum :: Ord a => Infinite a -> a # | |
Traversable 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", ...]