Data.Functor.Reverse
Copyright | (c) Russell O'Connor 2009 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Description
Making functors whose elements are notionally in the reverse order from the original functor.
The same functor, but with Foldable
and Traversable
instances that process the elements in the reverse order.
Constructors
Reverse | |
Fields
|
Instances
Monad m => Monad (Reverse m) | Derived instance. |
Functor f => Functor (Reverse f) | Derived instance. |
MonadFail m => MonadFail (Reverse m) | |
Defined in Data.Functor.Reverse | |
Applicative f => Applicative (Reverse f) | Derived instance. |
Defined in Data.Functor.Reverse | |
Foldable f => Foldable (Reverse f) | Fold from right to left. |
Defined in Data.Functor.Reverse Methodsfold :: Monoid m => Reverse f m -> m Source foldMap :: Monoid m => (a -> m) -> Reverse f a -> m Source foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m Source foldr :: (a -> b -> b) -> b -> Reverse f a -> b Source foldr' :: (a -> b -> b) -> b -> Reverse f a -> b Source foldl :: (b -> a -> b) -> b -> Reverse f a -> b Source foldl' :: (b -> a -> b) -> b -> Reverse f a -> b Source foldr1 :: (a -> a -> a) -> Reverse f a -> a Source foldl1 :: (a -> a -> a) -> Reverse f a -> a Source toList :: Reverse f a -> [a] Source null :: Reverse f a -> Bool Source length :: Reverse f a -> Int Source elem :: Eq a => a -> Reverse f a -> Bool Source maximum :: Ord a => Reverse f a -> a Source minimum :: Ord a => Reverse f a -> a Source | |
Traversable f => Traversable (Reverse f) | Traverse from right to left. |
Defined in Data.Functor.Reverse Methodstraverse :: Applicative f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) Source sequenceA :: Applicative f0 => Reverse f (f0 a) -> f0 (Reverse f a) Source mapM :: Monad m => (a -> m b) -> Reverse f a -> m (Reverse f b) Source sequence :: Monad m => Reverse f (m a) -> m (Reverse f a) Source | |
Contravariant f => Contravariant (Reverse f) | Derived instance. |
Eq1 f => Eq1 (Reverse f) | |
Ord1 f => Ord1 (Reverse f) | |
Defined in Data.Functor.Reverse | |
Read1 f => Read1 (Reverse f) | |
Defined in Data.Functor.Reverse MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Reverse f a) Source liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Reverse f a] Source liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Reverse f a) Source liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Reverse f a] Source | |
Show1 f => Show1 (Reverse f) | |
Alternative f => Alternative (Reverse f) | Derived instance. |
MonadPlus m => MonadPlus (Reverse m) | Derived instance. |
(Eq1 f, Eq a) => Eq (Reverse f a) | |
(Ord1 f, Ord a) => Ord (Reverse f a) | |
Defined in Data.Functor.Reverse | |
(Read1 f, Read a) => Read (Reverse f a) | |
(Show1 f, Show a) => Show (Reverse f a) | |
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/transformers-0.5.6.2/Data-Functor-Reverse.html