+import Control.Applicative
+
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
liftA2 h fa fb = (h `fmap` fa) <*> fb
-- f has the type (a -> b), so pure f has the type f (a -> b)
-- pure f <*> x => f (a -> b> <*> f a => f b
--}
\ No newline at end of file
+-}
+
+type Name = String
+
+data Employee = Employee { name :: Name
+ , phone :: String }
+ deriving Show
+
+newtype ZipList a = ZipList { getZipList :: [a] }
+ deriving (Eq, Show, Functor)
+
+instance Applicative ZipList where
+ pure = ZipList . repeat
+ ZipList fs <*> ZipList xs = ZipList (zipWith ($) fs xs)
+
+instance Applicative ((->) e) where
+ -- pure :: a -> ((->) e a)
+ -- = a -> (e -> a)
+ pure = const
+-- f <*> x
+-- (e -> (a -> b)) <*> (e -> a) -> (e -> b)
+ f <*> x = \e -> (f e) (x e)