There may be more than one way to make a parameterised type into an applicative functor. For example, the library control.Applicative provides an alternative 'zippy' instance for lists, in which the function pure makes an infinite list of copies of its argument, and the operator $\langle\star\rangle$ applies each argument function to the corresponding argument value at the same position. Complete the following declarations that implement this idea:
newtype ziplist a $=\mathrm{z}$ [a] deriving Show
instance Eunctor zipList where
- fmap :: (a $\rightarrow$ b) $\rightarrow$ Ziplist a $\rightarrow$ Ziplist b
$\operatorname{mip} g(z \times s)=\ldots$
instance Applicative ziplist where
- pure: : a $\rightarrow$ ziplist a
pure $\mathrm{x}=\ldots$
$-\langle *\rangle:$ : ziplist $(\mathrm{a} \rightarrow \mathrm{b})->$ ziplist a $\rightarrow$ ziplist b
$\left(\begin{array}{ll}2 & g s\end{array}\right)<\$>\left(\begin{array}{ll}Z & x s\end{array}\right)=\ldots$
The ziptist wrapper around the list type is required because each type can only have at most one instance declaration for a given class.