Module

Data.Monoid.Endo

Package
purescript-prelude
Repository
purescript/purescript-prelude

#Endo Source

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