refactor mapWith, flatMapWith and filterWith to each use two parameter lists