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