You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
157 B

module Sum where
data Sum a b = First a | Second b deriving (Eq, Show)
instance Functor (Sum a) where
fmap f (Second b) = Second $ f b
fmap _ a = a