Sign up for a GitHub account Sign in All Gists public patrickt / either.hs Created 2014-06-03 Gist Detail Revisions 1 Download Gist Clone this gist Embed this gist Link to this gist either.hs Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 data Either a b = Left a | Right b isLeft :: Either a b -> Bool isLeft ( Left _ ) = True isLeft _ = False either :: ( a -> c ) -> ( b -> c ) -> Either a b -> c either f _ ( Left x ) = f x either _ g ( Right y ) = g y lefts :: [ Either a b ] -> [ a ] lefts x = [ a | Left a <- x ] Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment /.discussion-timeline Something went wrong with that request. Ple...