
3 Jun
2013
3 Jun
'13
9:59 a.m.
On 13-05-30 03:53 PM, Gabriel Gonzalez wrote:
I'm surprised that `Either` does not have a `Foldable` instance of the form:
import Data.Foldable import Data.Monoid
instance Foldable (Either e) where foldMap f (Left _) = mempty foldMap f (Right r) = f r
foldr _ z (Left _) = z foldr f z (Right r) = f r z
+1 for adding it