2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1997
4 \section[PrelEither]{Module @PrelEither@}
9 {-# OPTIONS -fno-implicit-prelude #-}
11 module PrelEither where
15 data Either a b = Left a | Right b deriving (Eq, Ord, Show {- Read -} )
17 either :: (a -> c) -> (b -> c) -> Either a b -> c
18 either f _ (Left x) = f x
19 either _ g (Right y) = g y