[Haskell-cafe] On to applicative

michael rice nowgate at yahoo.com
Sat Aug 28 20:43:52 EDT 2010


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




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100828/ecfdf7f1/attachment.html


More information about the Haskell-Cafe mailing list