From d3dd0e129658e3617f9e6e4fa0910cb15c42520d Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Tue, 14 Apr 2015 00:10:21 +0200 Subject: Send mail to notify for new ads --- src/Utils/Either.hs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/Utils/Either.hs (limited to 'src/Utils/Either.hs') diff --git a/src/Utils/Either.hs b/src/Utils/Either.hs new file mode 100644 index 0000000..5d62dcc --- /dev/null +++ b/src/Utils/Either.hs @@ -0,0 +1,7 @@ +module Utils.Either + ( mapLeft + ) where + +mapLeft :: (a -> c) -> Either a b -> Either c b +mapLeft f (Left l) = Left (f l) +mapLeft _ (Right r) = (Right r) -- cgit v1.2.3