-
-
Save MelkorNemesis/b53535f298d478aa437853c8180dbbd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. From https://gist.github.com/MelkorNemesis/1a46a868c508ee5b0e37eafabda3fedc | |
instance Monoid b => Monoid (a -> b) where | |
mappend f g x = f x `mappend` g x | |
------------------------------------------ | |
2. From https://hackage.haskell.org/package/base-4.14.1.0/docs/src/GHC.Base.html#Semigroup | |
instance Semigroup b => Semigroup (a -> b) where | |
f <> g = \x -> f x <> g x | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment