implement zipWith using higher order function