The latest version of both is 0.1.1.2-0.
both
Version 0.1.1.0 revision 0 uploaded by barrucadu.
Package meta
- Synopsis
- Like Maybe, but with a different Monoid instance.
- Description
The Monoid instance for Maybe behaves like so:
instance Monoid a => Monoid (Maybe a) where mappend (Just x) (Just y) = Just $ x <> y mappend (Just x) Nothing = Just x mappend Nothing (Just y) = Just y mappend Nothing Nothing = Nothing mempty = Nothing
Both is a newtype wrapper around Maybe providing this instance:
instance Monoid a => Monoid (Both a) where mappend (Just x) (Just y) = Just $ x <> y mappend _ _ = Nothing mempty = Just mempty
- Author
- Michael Walker
- Bug reports
- https://github.com/barrucadu/both/issues
- Category
- Data
- Copyright
- n/a
- Homepage
- https://github.com/barrucadu/both
- Maintainer
- mike@barrucadu.co.uk
- Package URL
- n/a
- Stability
- n/a