
Anecdotally, today I wrote `foldMap toList`, to use as `Maybe (NonEmpty a) -> [a]`. Also I rely heavily in lens-based code on the `folded :: Fold (Maybe a) a`. So :-1: for me. OTOH :+1: for using non-default preludes for teaching. - Oleg On 02.03.2017 19:35, Francesco Ariis wrote:
On Thu, Mar 02, 2017 at 05:19:26PM +0000, Oliver Charles wrote:
Personally, I think it would be a shame to lose foldMap on EIther. I frequently foldMap over Maybe values (where mempty is suitable in case of "failure"), and I can certainly see myself doing the same thing with Either. I am not trying to be polemic, just to see where the community stands: regarding Either/Maybe: do you have use cases for length (sum) too?
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries