Module

Data.Monoid.Endo

#Endo

newtype Endo :: forall k. (k -> k -> Type) -> k -> Typenewtype Endo c a

Monoid and semigroup for category endomorphisms.

When c is instantiated with -> this composes functions of type a -> a:

Endo f <> Endo g == Endo (f <<< g)
(mempty :: Endo _) == Endo identity

Constructors

Instances

Modules