I'm looking at a discussion of Either (as functor) here: http://learnyouahaskell.com/making-our-own-types-and-typeclasses#the-functor-typeclass
instance Functor (Either a) where
fmap f (Right x) = Right (f x)
fmap f (Left x) = Left x
And this line in Data.Either
Functor (Either a)
but no fmap defined here.
How come?
Michael
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
