Copyright | (c) 2013-2015, Peter Trško |
---|---|
License | BSD3 |
Maintainer | peter.trsko@gmail.com |
Stability | experimental |
Portability | NoImplicitPrelude |
Safe Haskell | Safe |
Language | Haskell2010 |
Utilities for Endo
data type from Data.Monoid module.
- type E a = a -> a
- newtype Endo a :: * -> * = Endo {
- appEndo :: a -> a
- runEndo :: a -> Endo a -> a
- mapEndo :: (E a -> E b) -> Endo a -> Endo b
- mapEndo2 :: (E a -> E b -> E c) -> Endo a -> Endo b -> Endo c
- liftEndo :: Functor f => Endo a -> Endo (f a)
- endo :: Functor f => (E a -> f (E b)) -> Endo a -> f (Endo b)
Endo
newtype Endo a :: * -> *
The monoid of endomorphisms under composition.
Generic (Endo a) | |
Monoid (Endo a) | |
FromEndo (Endo a) Source | |
AnEndo (Endo a) Source | |
FoldEndoArgs (Endo a) Source | |
type Rep (Endo a) = D1 D1Endo (C1 C1_0Endo (S1 S1_0_0Endo (Rec0 (a -> a)))) | |
type EndoOperatedOn (Endo a) = a Source | |
type EndoOperatesOn (Endo a) = a Source | |
type ResultOperatesOn (Endo a) = a Source | |
type Result (Endo a) = Endo a Source |
mapEndo2 :: (E a -> E b -> E c) -> Endo a -> Endo b -> Endo c Source
Variation of mapEndo
for functions with arity two.