MaybeList Applicative

In an exercise from the previous lesson, you implemented the Applicative for MaybeList. Do it again, but this time, derive it!

That MaybeList type we mentioned was a newtype, much like our ReaderIO type.

newtype MaybeList a = MaybeList (Maybe [a])
    deriving Show

You can see here for the various ways of writing that instance that we presented last time. This time the answer will be more succinct.

Sign up for access to the full page, plus the complete archive and all the latest content.