Add instance Alternative (Either e)

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.

8 Aug
8 Aug
1:37 a.m.
On Tue, Aug 6, 2019 at 9:40 PM Dannyu NDos
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.
2113
Age (days ago)
2115
Last active (days ago)
1 comments
2 participants
participants (2)
-
Dannyu NDos
-
Herbert Valerio Riedel