Skip to content

Instantly share code, notes, and snippets.

@abiodun0
Created May 19, 2017 21:02
Show Gist options
  • Select an option

  • Save abiodun0/7e999e921dc6f0a1ab95578805842ddc to your computer and use it in GitHub Desktop.

Select an option

Save abiodun0/7e999e921dc6f0a1ab95578805842ddc to your computer and use it in GitHub Desktop.
Endo Functors and Monads
instance Monoid (Endofunctor a) where
append :: (a -> m a) -> (a -> m a) -> (a -> m a)`
append = (>=>)
empty :: (a -> m a)
empty = return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment