
4 Dec
2012
4 Dec
'12
7:14 p.m.
On 4 December 2012 22:04, Henning Thielemann
However, I think I would prefer maybeLeft and maybeRight.
I'd also prefer these names. I haven't had much use for any of these functions since I usually use custom types instead of Either, but I think they are obvious, simple and small functions, so I think it's a good idea to have them in the standard library rather than have everyone define their own version. +1 for isLeft/isRight, maybeLeft/maybeRight I'm not a fan of partial functions like fromLeft/fromRight. They lead to horrible error messages in current GHCs, so I would always write them as "let Left x = ... in ...". I'm not voting against them, but I'm also not voting for them, either. / Thomas