Safe Haskell | Safe-Inferred |
---|
EList is a stream of elements, which may either carry a value, or be some kind of metadata, and functions to process values and ignore the metadata.
Synopsis
- data Elt e a
- metas :: [Elt e a] -> [e]
- elts :: [Elt e a] -> [a]
- partition :: [Elt e a] -> ([e], [a])
- either :: (e -> b) -> (a -> b) -> Elt e a -> b
- fromEither :: Either e a -> Elt e a
- toEither :: Elt e a -> Either e a
- map :: (a -> b) -> [Elt e a] -> [Elt e b]
- mapM :: Applicative m => (a -> m b) -> [Elt e a] -> m [Elt e b]
- apply :: Applicative m => (a -> m (Elt e b)) -> Elt e a -> m (Elt e b)
- mapE :: (a -> Elt e b) -> [Elt e a] -> [Elt e b]
- mapEM :: Applicative m => (a -> m (Elt e b)) -> [Elt e a] -> m [Elt e b]
- concatMapE :: (a -> [Elt e b]) -> [Elt e a] -> [Elt e b]
- concatMapEM :: Applicative m => (a -> m [Elt e b]) -> [Elt e a] -> m [Elt e b]
- mapAccumLE :: (state -> a -> (state, Elt e b)) -> state -> [Elt e a] -> (state, [Elt e b])
- zip :: [a] -> [Elt e b] -> [Elt e (a, b)]
- zipPaddedSnd :: [a] -> [Elt e b] -> [Elt e (a, Maybe b)]
- zip3 :: [a] -> [b] -> [Elt e c] -> [Elt e (a, b, c)]
- zip4 :: [a] -> [b] -> [c] -> [Elt e d] -> [Elt e (a, b, c, d)]
- zipNexts :: [Elt e a] -> [Elt e (a, [a])]
Documentation
Instances
Bifunctor Elt Source # | |
Foldable (Elt e) Source # | |
Defined in Util.EList fold :: Monoid m => Elt e m -> m # foldMap :: Monoid m => (a -> m) -> Elt e a -> m # foldMap' :: Monoid m => (a -> m) -> Elt e a -> m # foldr :: (a -> b -> b) -> b -> Elt e a -> b # foldr' :: (a -> b -> b) -> b -> Elt e a -> b # foldl :: (b -> a -> b) -> b -> Elt e a -> b # foldl' :: (b -> a -> b) -> b -> Elt e a -> b # foldr1 :: (a -> a -> a) -> Elt e a -> a # foldl1 :: (a -> a -> a) -> Elt e a -> a # elem :: Eq a => a -> Elt e a -> Bool # maximum :: Ord a => Elt e a -> a # minimum :: Ord a => Elt e a -> a # | |
Traversable (Elt e) Source # | |
Functor (Elt e) Source # | |
(Show e, Show a) => Show (Elt e a) Source # | |
(Eq e, Eq a) => Eq (Elt e a) Source # | |
fromEither :: Either e a -> Elt e a Source #
apply :: Applicative m => (a -> m (Elt e b)) -> Elt e a -> m (Elt e b) Source #
Like traverse
, but the function can return Meta.
mapE :: (a -> Elt e b) -> [Elt e a] -> [Elt e b] Source #
Like map
, except the function can also return Meta.
concatMapEM :: Applicative m => (a -> m [Elt e b]) -> [Elt e a] -> m [Elt e b] Source #