daily pastebin goal

wtf haskell 2

madetara May 16th, 2018 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. newtype Box a = Box { getMaybe :: Maybe a }
  2.     deriving (Eq,Show)
  4. instance Monoid a => Monoid (Box a) where
  5.     mempty = Box $ Just mempty
  6.     mappend (Box Nothing) a = Box Nothing
  7.     mappend a (Box Nothing) = Box Nothing
  8.     mappend (Box a) (Box b) = Box $ mappend a b
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand