
20 May
2016
20 May
'16
11:22 p.m.
On Fri, May 20, 2016 at 10:08:40PM +0200, Anton Felix Lorenzen wrote:
When working with Either, I am often missing two simple functions: fromRight :: Either a b -> b fromLeft :: Either a b -> a
Sometimes my lazy inner-self is guilty of longing for `fromRight` when typing: λ> either undefined id xyz but then again, importing Data.Either wouldn't make thing any shorter :P λ> :m +Da<tab>.Ei<tab> λ> fromRight zyx I can see fromRight being useful in one-off script; anything bigger than a few lines is asking for trouble!