
No one wants to remove fromMaybe. In fact, it could serve as a template for
total fromLeft and fromRight:
fromLeft :: b -> (a -> b) -> Either a x -> b
fromRight :: b -> (a -> b) -> Either x a -> b
On May 21, 2016 8:55 AM, "Edward Kmett"
When working with Either, I am often missing two simple functions: fromRight :: Either a b -> b fromLeft :: Either a b -> a
It has been implemented a couple of times: http://hayoo.fh-wedel.de/?query=fromRight
But I don't want to depend on yet another library for such a basic function.
Could it be added?
Anton _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries