class Zip a b | b -> a where zipper :: [a] -> b instance Zip a [a] where zipper as = as instance Zip a b => Zip (x -> a) ([x] -> b) where zipper fs as = zipper (zipWith ($) fs as) generalZipWith :: Zip a b => a -> b generalZipWith f = zipper (repeat f)