Add remaining haskell book exercises
This commit is contained in:
10
Haskell-book/15/orphan-instance/Listy.hs
Normal file
10
Haskell-book/15/orphan-instance/Listy.hs
Normal file
@@ -0,0 +1,10 @@
|
||||
module Listy where
|
||||
|
||||
newtype Listy a =
|
||||
Listy [a]
|
||||
deriving (Eq, Show)
|
||||
|
||||
instance Monoid (Listy a) where
|
||||
mempty = Listy []
|
||||
mappend (Listy l) (Listy l') =
|
||||
Listy $ mappend l l'
|
||||
Reference in New Issue
Block a user