Copyright | (c) Russell O'Connor 2009 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | R.Paterson@city.ac.uk |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Making functors whose elements are notionally in the reverse order from the original functor.
Synopsis
- newtype Reverse f a = Reverse {
- getReverse :: f a
Documentation
The same functor, but with Foldable
and Traversable
instances
that process the elements in the reverse order.
Reverse | |
|
Instances
Generic1 (Reverse f :: k -> Type) Source # | |
MonadFail m => MonadFail (Reverse m) Source # | |
Defined in Data.Functor.Reverse | |
Foldable f => Foldable (Reverse f) Source # | Fold from right to left. |
Defined in Data.Functor.Reverse fold :: Monoid m => Reverse f m -> m # foldMap :: Monoid m => (a -> m) -> Reverse f a -> m # foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m # foldr :: (a -> b -> b) -> b -> Reverse f a -> b # foldr' :: (a -> b -> b) -> b -> Reverse f a -> b # foldl :: (b -> a -> b) -> b -> Reverse f a -> b # foldl' :: (b -> a -> b) -> b -> Reverse f a -> b # foldr1 :: (a -> a -> a) -> Reverse f a -> a # foldl1 :: (a -> a -> a) -> Reverse f a -> a # toList :: Reverse f a -> [a] # length :: Reverse f a -> Int # elem :: Eq a => a -> Reverse f a -> Bool # maximum :: Ord a => Reverse f a -> a # minimum :: Ord a => Reverse f a -> a # | |
Foldable1 f => Foldable1 (Reverse f) Source # | Fold from right to left. |
Defined in Data.Functor.Reverse fold1 :: Semigroup m => Reverse f m -> m # foldMap1 :: Semigroup m => (a -> m) -> Reverse f a -> m # foldMap1' :: Semigroup m => (a -> m) -> Reverse f a -> m # toNonEmpty :: Reverse f a -> NonEmpty a # maximum :: Ord a => Reverse f a -> a # minimum :: Ord a => Reverse f a -> a # foldrMap1 :: (a -> b) -> (a -> b -> b) -> Reverse f a -> b # foldlMap1' :: (a -> b) -> (b -> a -> b) -> Reverse f a -> b # foldlMap1 :: (a -> b) -> (b -> a -> b) -> Reverse f a -> b # foldrMap1' :: (a -> b) -> (a -> b -> b) -> Reverse f a -> b # | |
Eq1 f => Eq1 (Reverse f) Source # | |
Ord1 f => Ord1 (Reverse f) Source # | |
Defined in Data.Functor.Reverse | |
Read1 f => Read1 (Reverse f) Source # | |
Defined in Data.Functor.Reverse | |
Show1 f => Show1 (Reverse f) Source # | |
Contravariant f => Contravariant (Reverse f) Source # | Derived instance. |
Traversable f => Traversable (Reverse f) Source # | Traverse from right to left. |
Defined in Data.Functor.Reverse | |
Alternative f => Alternative (Reverse f) Source # | Derived instance. |
Applicative f => Applicative (Reverse f) Source # | Derived instance. |
Functor f => Functor (Reverse f) Source # | Derived instance. |
Monad m => Monad (Reverse m) Source # | Derived instance. |
MonadPlus m => MonadPlus (Reverse m) Source # | Derived instance. |
Generic (Reverse f a) Source # | |
(Read1 f, Read a) => Read (Reverse f a) Source # | |
(Show1 f, Show a) => Show (Reverse f a) Source # | |
(Eq1 f, Eq a) => Eq (Reverse f a) Source # | |
(Ord1 f, Ord a) => Ord (Reverse f a) Source # | |
Defined in Data.Functor.Reverse | |
type Rep1 (Reverse f :: k -> Type) Source # | |
Defined in Data.Functor.Reverse | |
type Rep (Reverse f a) Source # | |
Defined in Data.Functor.Reverse |