
6 Aug
2019
6 Aug
'19
3:40 p.m.
instance Monoid e => Alternative (Either e) where empty = left mempty Left x <|> Left y = Left (x <> y) Left _ <|> y = y x <|> _ = x Leftmost Right is returned for sake of consistence with Semigroup instance.