Implement `Applicative Maybe` Typeclassopedia presents the following exercise:


  Maybe can easily be made an instance of Applicative; writing such an instance is left as an exercise for the reader.


Here's my implementation:

data Option a = Some a 
                | None deriving Show

instance Functor Option where
   fmap _ None     = None
   fmap f (Some x) = Some (f x)

instance Applicative Option where
   pure x                = Some x
   (Some f) &lt;*&gt; (Some x) = Some (f x) 
   _ &lt;*&gt; _               = None  


How does this look? In particular, I'm curious if the second line of the Applicative Option looks good.

Should I be using fmap on the right-hand side instead of Some (f x)?
Looks good, follows the laws of Applicative AFAICT, and I'd leave it like this, with fmap you'd need to write more.