MaybeList Applicative
Implement an
Applicativeinstance for theMaybeListtype. Don’t forget that you’ll need itsFunctorinstance in scope – preferably in the same module as itsApplicativeinstance (you can use any of the three we’ve talked about) – and don’t forget aboutpure.
We’ll repeat the type definition and Functor instance here for the sake of completeness.
We had written the Functor three ways; here we give the two that we think are the most useful models for the Applicative instance. The first relied on just the list fmap:

