We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 02124d6 commit 99ac464Copy full SHA for 99ac464
chapter14-Foldables-and-friends/2.hs
@@ -0,0 +1,9 @@
1
+-- This is a hypothetical program which does not run in GHCi.
2
+
3
+import Data.Monoid
4
5
+instance Monoid b => Monoid (a -> b) where
6
+ -- mempty :: a -> b
7
+ mempty _ = mempty
8
+ -- mappend :: (a -> b) -> (a -> b) -> a -> b
9
+ (f `mappend` g) x = f x `mappend` g x
0 commit comments